ai-live/.gitea/workflows/docker.yaml
CN-P5 588a28fcbb
All checks were successful
部署到腾讯云 / build-and-push (push) Successful in 2s
远程部署
2025-04-23 21:18:55 +08:00

33 lines
864 B
YAML

name: 部署到腾讯云
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
MYREGISTRY : ${{ vars.MYREGISTRY }}
MYIMAGE : ${{ vars.MYIMAGE }}
MYPORT: ${{ vars.MYPORT }}
steps:
- name: 远程部署
uses: https://git.des8.com/docker/ssh-action@v1.0.0
with:
host: 122.51.147.115
port: 8022
username: root
key: ${{ secrets.KEY }}
script: |
cd /www/wwwroot/doc-live.des8.com
git clean -f
git remote rm origin
git remote add origin git@git.des8.com:weixiu/ai-live.git
git fetch --all
git reset --hard origin/main
git pull origin main
rm -rf /www/wwwroot/mei.des8.com/.gitea
chown -R www:www ./
pwd && ls -l