fix: 参考 new-pet 项目修正 Actions 配置
- 使用 hk 运行器(空闲状态) - 添加详细注释说明 - 参考 new-pet 的成熟配置 - 确保只在指定目录变更时触发
This commit is contained in:
@@ -10,6 +10,7 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# 使用 hk 运行器(空闲状态)
|
||||
runs-on: hk
|
||||
steps:
|
||||
- uses: https://gitea.neatcn.com/gouki/action-checkout@v4
|
||||
@@ -64,12 +65,14 @@ jobs:
|
||||
fi
|
||||
tar -czf deploy.tar.gz deploy/
|
||||
|
||||
- name: Upload deployment artifact
|
||||
uses: https://gitea.neatcn.com/gouki/action-upload-artifact@v3
|
||||
with:
|
||||
name: server-deploy
|
||||
path: server/deploy.tar.gz
|
||||
retention-days: 7
|
||||
- name: Persist deployment package on runner host
|
||||
run: |
|
||||
test -f server/deploy.tar.gz
|
||||
test -d /ci-artifacts
|
||||
cp server/deploy.tar.gz "/ci-artifacts/server-deploy-${{ gitea.sha }}.tar.gz"
|
||||
cp server/deploy.tar.gz /ci-artifacts/server-deploy-latest.tar.gz
|
||||
ls -la /ci-artifacts/server-deploy-latest.tar.gz
|
||||
echo "Deployment package saved on runner host: /ci-artifacts/server-deploy-latest.tar.gz"
|
||||
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
|
||||
Reference in New Issue
Block a user