Skip to content

Commit

Permalink
feat: add deploy server feature on pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
coding-convention committed Aug 10, 2023
1 parent bdf54f4 commit b1ab3be
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/Staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ jobs:
- name: Push Docker image to ECR
run: |
docker push ${{ secrets.ECR_REGISTRY }}/dev:latest
deploy:
needs: build-and-push
runs-on: ubuntu-latest

steps:
- name: Deploy on Staging Server
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.AWS_STAGING }}
username: ${{ secrets.AWS_SSH_USERNAME }}
key: ${{ secrets.AWS_SSH_KEY }}
script_stop: true
script: |
cd /app
docker-compose pull
docker-compose up -d

0 comments on commit b1ab3be

Please sign in to comment.