Обновить .gitea/workflows/build.yml
Some checks failed
Build and Test Application / deploy (push) Failing after 0s
Build and Test Application / build (push) Successful in 13s

This commit is contained in:
mt77 2025-05-12 04:34:56 +05:00
parent ee20f677be
commit 63a803e7e9

View File

@ -30,3 +30,21 @@ jobs:
tags: |
${{ vars.GIT_INSTANCE }}/${{ secrets.GIT_USERNAME }}/monitor:latest
${{ vars.GIT_INSTANCE }}/${{ secrets.GIT_USERNAME }}/monitor:${{ github.sha }}
deploy:
runs-on: small
need: build
steps:
- name: SSH deploy
uses: appleboy/ssh-action@master
with:
host: ${{ vars.REMOTE_SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
docker login -u ${{ secrets.GIT_USERNAME }} -p ${{ secrets.GIT_TOKEN }} ${{ vars.GIT_INSTANCE }}
sudo -s ${{ secrets.SSH_PASS }}
docker pull ${{ vars.GIT_INSTANCE }}/mt77/monitor:latest
docker stop monitor || true
docker rm monitor || true
docker run -d --name monitor ${{ vars.GIT_INSTANCE }}/mt77/monitor:latest