Skip to content

Commit 8150953

Browse files
oschwaldclaude
andcommitted
Add GitHub Pages deployment workflow
Deploys the Hugo spec site on push to main. Uses the same mise-action pattern as the precious workflow. All actions are SHA-pinned. After merge, change the Pages source in repo settings from "Deploy from a branch" to "GitHub Actions", then delete the gh-pages branch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 697c2cc commit 8150953

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/pages.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
workflow_dispatch:
7+
8+
permissions: {}
9+
10+
concurrency:
11+
group: pages
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
21+
with:
22+
persist-credentials: false
23+
24+
- name: Setup mise
25+
uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1
26+
with:
27+
cache: true
28+
29+
- name: Build docs
30+
run: mise run build-docs
31+
32+
- name: Configure Pages
33+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
34+
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
37+
with:
38+
path: docs/public
39+
40+
deploy:
41+
needs: build
42+
runs-on: ubuntu-latest
43+
permissions:
44+
pages: write
45+
id-token: write
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

0 commit comments

Comments
 (0)