diff --git a/.github/workflows/Staging.yml b/.github/workflows/Staging.yml index 1ba27da..88f9466 100644 --- a/.github/workflows/Staging.yml +++ b/.github/workflows/Staging.yml @@ -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 \ No newline at end of file