Skip to content

Commit cbde8b5

Browse files
jonathanperisclaude
andcommitted
ci: modernize GitHub Pages deployment to use actions/deploy-pages
Replace old branch-based deployment model (JamesIves/github-pages-deploy-action pushing to gh-pages) with the new GitHub Actions deployment model using actions/configure-pages, actions/upload-pages-artifact, and actions/deploy-pages. Rename deploy-docs.yml to deploy.yml. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 38b17f6 commit cbde8b5

2 files changed

Lines changed: 63 additions & 12 deletions

File tree

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy Docs
1+
name: Deploy to GitHub Pages
22

33
on:
44
workflow_dispatch:
@@ -8,11 +8,18 @@ on:
88
- 'docs/**'
99
gollum:
1010

11+
permissions:
12+
contents: write
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: github-pages
18+
cancel-in-progress: false
19+
1120
jobs:
12-
build-and-deploy:
21+
generate-docs:
1322
runs-on: ubuntu-latest
14-
permissions:
15-
contents: write
1623

1724
steps:
1825
- uses: actions/checkout@v6
@@ -43,3 +50,27 @@ jobs:
4350
git config user.email "github-actions[bot]@users.noreply.github.com"
4451
git add docs/docs/index.html
4552
git diff --staged --quiet || (git commit -m "chore: regenerate docs from wiki [skip ci]" && git push)
53+
54+
deploy:
55+
needs: generate-docs
56+
runs-on: ubuntu-latest
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
61+
steps:
62+
- uses: actions/checkout@v6
63+
with:
64+
ref: ${{ github.ref }}
65+
66+
- name: Pull latest changes
67+
run: git pull origin ${{ github.ref_name }}
68+
69+
- uses: actions/configure-pages@v6
70+
71+
- uses: actions/upload-pages-artifact@v4
72+
with:
73+
path: docs/
74+
75+
- id: deployment
76+
uses: actions/deploy-pages@v5

.github/workflows/main-release.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
name: Main Release
22

3-
# Grant write permission for repository contents to allow pushing changes.
43
permissions:
54
contents: write
65
packages: write
6+
pages: write
7+
id-token: write
78

89
on:
910
push:
@@ -114,12 +115,31 @@ jobs:
114115
with:
115116
name: stress-test-report
116117
path: ./prod/conf/stress-test/reports/stress-test-report.html
117-
# retention-days: 7
118118

119-
- name: Deploy Report to GitHub Pages
120-
uses: JamesIves/github-pages-deploy-action@v4
119+
deploy-report:
120+
needs: load-test
121+
runs-on: ubuntu-latest
122+
concurrency:
123+
group: github-pages
124+
cancel-in-progress: false
125+
environment:
126+
name: github-pages
127+
url: ${{ steps.deployment.outputs.page_url }}
128+
129+
steps:
130+
- uses: actions/checkout@v6
131+
132+
- name: Download stress test report
133+
uses: actions/download-artifact@v4
121134
with:
122-
branch: gh-pages
123-
folder: ./prod/conf/stress-test/reports
124-
target-folder: reports
125-
clean: false
135+
name: stress-test-report
136+
path: ./docs/reports/
137+
138+
- uses: actions/configure-pages@v6
139+
140+
- uses: actions/upload-pages-artifact@v4
141+
with:
142+
path: docs/
143+
144+
- id: deployment
145+
uses: actions/deploy-pages@v5

0 commit comments

Comments
 (0)