Skip to content

cd

cd #37

Workflow file for this run

name: cd
on:
workflow_run:
workflows: [ "ci" ]
paths:
- 'main-server/**'
- 'logging-server/**'
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: dorny/[email protected]
id: changes
with:
filters: |
main:
- 'main-server/**'
logging:
- 'logging-server/**'
- name: deploy main-server
# if: steps.changes.outputs.main == 'true'
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_SSH_PORT }}
script: |
chmod +x ~/script/deploy-main-server.sh
sh ~/script/deploy-main-server.sh
- name: deploy logging-server
# if: steps.changes.outputs.logging == 'true'
uses: appleboy/[email protected]
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
port: ${{ secrets.SERVER_SSH_PORT }}
script: |
chmod +x ~/script/deploy-logging-server.sh
sh ~/script/deploy-logging-server.sh