Sync docker-compose.yml to deploy path during CI/CD deploy
Some checks failed
CI/CD Pipeline - Apartment Dashboard / Run Linter (push) Successful in 11s
CI/CD Pipeline - Apartment Dashboard / Build & Push Image (push) Successful in 1m1s
CI/CD Pipeline - Apartment Dashboard / Scan Dependencies (push) Successful in 13s
CI/CD Pipeline - Apartment Dashboard / Deploy to Production (push) Failing after 18s
Some checks failed
CI/CD Pipeline - Apartment Dashboard / Run Linter (push) Successful in 11s
CI/CD Pipeline - Apartment Dashboard / Build & Push Image (push) Successful in 1m1s
CI/CD Pipeline - Apartment Dashboard / Scan Dependencies (push) Successful in 13s
CI/CD Pipeline - Apartment Dashboard / Deploy to Production (push) Failing after 18s
Adds checkout and SCP steps so changes to docker-compose.yml are automatically copied to the server before restarting.
This commit is contained in:
13
.github/workflows/deploy.yml
vendored
13
.github/workflows/deploy.yml
vendored
@ -178,6 +178,19 @@ jobs:
|
||||
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Sync docker-compose.yml to server
|
||||
uses: appleboy/scp-action@v0.1.7
|
||||
with:
|
||||
host: ${{ secrets.SSH_HOST }}
|
||||
username: ${{ secrets.SSH_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: ${{ secrets.SSH_PORT || 22 }}
|
||||
source: "docker-compose.yml"
|
||||
target: ${{ secrets.DEPLOY_PATH }}
|
||||
|
||||
- name: Deploy via SSH
|
||||
uses: appleboy/ssh-action@v1.2.4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user