depoly: support auto deploy

This commit is contained in:
Yeuoly 2024-10-23 17:55:11 +08:00
parent a0a1243c90
commit c2c07b0f4b
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
2 changed files with 24 additions and 0 deletions

View File

@ -5,6 +5,7 @@ on:
branches:
- "main"
- "deploy/dev"
- "dev/plugin-deploy"
release:
types: [published]

23
.github/workflows/deploy-plugin-dev.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Deploy Plugin Dev
on:
workflow_run:
workflows: ["Build and Push API & Web"]
branches:
- "dev/plugin-deploy"
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
if: |
github.event.workflow_run.conclusion == 'success'
steps:
- name: Deploy to server
uses: appleboy/ssh-action@v0.1.8
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: "echo 123"