Skip to content

Merge pull request #188 from AkshataKatwal16/page-issue #34

Merge pull request #188 from AkshataKatwal16/page-issue

Merge pull request #188 from AkshataKatwal16/page-issue #34

name: Deployment on the Tekdi DEV Server
on:
push:
branches:
- release-1.1.0
jobs:
TEKDI-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.DEV_HOST_NAME }}
username: ${{ secrets.DEV_USERNAME }}
key: ${{ secrets.DEV_EC2_SSH_KEY }}
port: ${{ secrets.DEV_PORT }}
script: |
cd ${{ secrets.DEV_TARGET_DIR }}
if [ -f .env ]; then
rm .env
fi
echo "${{ secrets.DEV_ENV }}" > .env
ls -ltra
chmod +x deploy.sh
./deploy.sh ${{ env.BRANCH_NAME }}