Skip to content

Commit

Permalink
Create dev-deployment.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhilashKD authored Feb 27, 2025
1 parent b952eac commit 5903155
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/dev-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Dev-Deployment Pratham-OU Mumbai Region
on:
push:
branches:
- main
jobs:
DEV-DEPLOYMENT:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Extract Branch Name
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV

- name: Deploy Stack
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST_NAME_DEV }}
username: ${{ secrets.USERNAME_DEV }}
key: ${{ secrets.EC2_SSH_KEY_DEV }}
port: ${{ secrets.PORT_DEV }}
script: |
cd ${{ secrets.TARGET_DIR_DEV }}
if [ -f .env ]; then
rm .env
fi
echo "${{ secrets.DEV_ENV }}" > .env
ls -ltra
./deploy.sh ${{ env.BRANCH_NAME }}

0 comments on commit 5903155

Please sign in to comment.