Merge pull request #36 from upendraTekdi/cohort_list #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deployment on the Pratham-PROD Frontend Server | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
PROD-PRAHAM-DEPLOYMENT: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- name: Deploy Stack | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST_NAME_PROD }} | |
username: ${{ secrets.USERNAME_PROD }} | |
key: ${{ secrets.EC2_SSH_KEY_PROD }} | |
port: ${{ secrets.PORT_PROD }} | |
script: | | |
cd ${{ secrets.TARGET_DIR_PROD }} | |
if [ -f .env ]; then | |
rm .env | |
fi | |
echo "${{ secrets.PROD_ENV }}" > .env | |
ls -ltra | |
./deploy.sh |