ci(action): add deploy action
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
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 }}
|
||||||
|
script: |
|
||||||
|
cd /opt/gallery
|
||||||
|
docker compose pull
|
||||||
|
docker compose up -d
|
||||||
@@ -15,6 +15,6 @@ jobs:
|
|||||||
- uses: docker/login-action@v4
|
- uses: docker/login-action@v4
|
||||||
with:
|
with:
|
||||||
registry: git.shmyga.ru
|
registry: git.shmyga.ru
|
||||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
username: ${{ vars.PUBLISH_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.PUBLISH_TOKEN }}
|
||||||
- run: pm publish:docker -vv
|
- run: pm publish:docker -vv
|
||||||
|
|||||||
Reference in New Issue
Block a user