Sync docker-compose.yml to deploy path during CI/CD deploy
Some checks failed
CI/CD Pipeline - Apartment API / Scan Dependencies (push) Successful in 12s
CI/CD Pipeline - Apartment API / Lint & Test (push) Successful in 50s
CI/CD Pipeline - Apartment API / Send Webhook Notification (push) Has been skipped
CI/CD Pipeline - Apartment API / Build & Push Image (push) Successful in 1m40s
CI/CD Pipeline - Apartment API / Deploy to Production (push) Failing after 19s
Some checks failed
CI/CD Pipeline - Apartment API / Scan Dependencies (push) Successful in 12s
CI/CD Pipeline - Apartment API / Lint & Test (push) Successful in 50s
CI/CD Pipeline - Apartment API / Send Webhook Notification (push) Has been skipped
CI/CD Pipeline - Apartment API / Build & Push Image (push) Successful in 1m40s
CI/CD Pipeline - Apartment API / Deploy to Production (push) Failing after 19s
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
@ -317,6 +317,19 @@ jobs:
|
|||||||
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
|
||||||
|
|
||||||
steps:
|
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
|
- name: Deploy via SSH
|
||||||
uses: appleboy/ssh-action@v1.2.4
|
uses: appleboy/ssh-action@v1.2.4
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user