Skip to content

Commit 63fc737

Browse files
committed
修復部署:改用 gh-pages 分支部署方式
- 使用 peaceiris/actions-gh-pages 推送到 gh-pages 分支 - 配合 repo 的 GitHub Pages 設定(source: gh-pages) - 移除 actions/deploy-pages 直接部署方式
1 parent f8b1091 commit 63fc737

File tree

1 file changed

+21
-5
lines changed

1 file changed

+21
-5
lines changed

.github/workflows/run.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,29 @@ jobs:
7878
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && github.repository == 'cypherpunks-core/cypherpunks-core.github.io'
7979
needs: build
8080
runs-on: ubuntu-latest
81-
environment:
82-
name: github-pages
83-
url: ${{ steps.deployment.outputs.page_url }}
8481
steps:
82+
- name: Checkout repository
83+
uses: actions/checkout@v4
84+
85+
- name: Download artifact
86+
uses: actions/download-artifact@v4
87+
with:
88+
name: github-pages
89+
path: _site
90+
91+
- name: Extract artifact
92+
run: |
93+
cd _site
94+
tar -xvf artifact.tar
95+
rm artifact.tar
96+
8597
- name: Deploy to GitHub Pages
86-
id: deployment
87-
uses: actions/deploy-pages@v4
98+
uses: peaceiris/actions-gh-pages@v4
99+
with:
100+
github_token: ${{ secrets.GITHUB_TOKEN }}
101+
publish_dir: ./_site
102+
publish_branch: gh-pages
103+
force_orphan: true
88104

89105
# Quality Checks (run on PRs)
90106
quality-check:

0 commit comments

Comments
 (0)