Skip to content

Deploy

Deploy #6

Workflow file for this run

name: Deploy on Dev server
on:
push:
branches:
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to EC2
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_HOST }} << 'EOF'
cd ~/wink-official-backend
git pull origin develop
echo "${{ secrets.CICD_DOCKER_ENV }}" > cicd.docker.env
docker compose build
docker compose down
docker compose up -d
EOF