ci: 修复GitHub Actions权限和rebase问题

This commit is contained in:
Vaica committed 2026-06-03 14:13:16 +08:00
1 parent 444056d34a
commit 1d7f63bc0c
2 files changed
+6

No files matched your search

+4
View File
@@ -92,7 +92,11 @@ jobs:
continue-on-error: true
run: |
git fetch origin main
# stash任何未提交的更改,避免rebase失败
git stash push -m "temp stash for rebase"
git rebase origin/main
# 恢复stash的更改
git stash pop || true
if ! git log --oneline -1 | grep -q "\[skip ci\]"; then
echo "No auto-commits to push"
else
+2
View File
@@ -35,6 +35,8 @@ jobs:
name: Subset Fonts
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write # 添加写权限
# 只在主仓库上运行(fork不运行)
if: github.repository == 'zqlit/blog'