ci(action): add deploy action
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
name: deploy
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [release]
|
||||
types: [completed]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: ${{ secrets.DEPLOY_USERNAME }}
|
||||
key: ${{ secrets.DEPLOY_KEY }}
|
||||
passphrase: ${{ secrets.DEPLOY_PASSPHRASE }}
|
||||
script: |
|
||||
cd /opt/gallery
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
Reference in New Issue
Block a user