Skip to content

Commit f0ea5cf

Browse files
authored
Create dev-PYM.yaml
1 parent c10cd72 commit f0ea5cf

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/dev-PYM.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: DEVPYM-Deployment Pratham-OU Mumbai Region
2+
on:
3+
push:
4+
branches:
5+
- youth-management
6+
jobs:
7+
DEVPYM-DEPLOYMENT:
8+
runs-on: ubuntu-latest
9+
timeout-minutes: 15
10+
steps:
11+
- name: Extract Branch Name
12+
run: echo "BRANCH_NAME=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
13+
14+
- name: Deploy Stack
15+
uses: appleboy/ssh-action@master
16+
with:
17+
host: ${{ secrets.HOST_NAME_DEVPYM }}
18+
username: ${{ secrets.USERNAME_DEVPYM }}
19+
key: ${{ secrets.EC2_SSH_KEY_DEVPYM }}
20+
port: ${{ secrets.PORT_DEVPYM }}
21+
script: |
22+
cd ${{ secrets.TARGET_DIR_DEVPYM }}
23+
if [ -f .env ]; then
24+
rm .env
25+
fi
26+
echo "${{ secrets.DEVPYM_ENV }}" > .env
27+
ls -ltra
28+
./deploy.sh ${{ env.BRANCH_NAME }}

0 commit comments

Comments
 (0)