This commit is contained in:
toom1996
2026-10-20 23:11:57 +08:00
parent 5db90af73a
commit acc0928401
5 changed files with 313 additions and 148 deletions

View File

@ -0,0 +1,19 @@
name: deploy
on:
# 手动触发:在 Gitea 仓库 Actions 页面点「Run workflow」才部署,
# 避免每次 push 到 main 的半成品代码被自动上线。
workflow_dispatch:
jobs:
deploy:
runs-on: docker
steps:
- name: SSH 到服务器执行上线脚本
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
script: |
cd /opt/fashion/test
./deploy.sh