Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,31 @@ on:
- main # 当 main 分支有推送时触发部署
workflow_dispatch: # 允许手动触发

# 部署串行执行,不取消进行中的任务:取消可能留下半套 gh-pages 产物
concurrency:
group: deploy-main
cancel-in-progress: false

jobs:
build:
runs-on: self-hosted
timeout-minutes: 30

steps:
# runner 到 github.com 偶发断连;先做 30 秒内的可达性探测,失败立即退出
- name: Probe github.com egress
run: |
for i in 1 2 3; do
if curl -sS --max-time 10 -o /dev/null https://github.com; then
echo "github.com reachable (attempt $i)"
exit 0
fi
echo "Attempt $i failed, retrying..."
sleep 5
done
echo "::error::github.com unreachable from runner"
exit 1

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
Loading