Skip to content

Commit 3ccee8f

Browse files
committed
Align docs workflow with AgentPin pattern
- configure-pages step first (enables Pages programmatically) - Single-job deploy instead of split build/deploy - zensical build --clean for reproducible output - actions/upload-pages-artifact@v4 and actions/checkout@v5 to match the versions AgentPin runs in production - Floating python-version: 3.x Kept relative to AgentPin's workflow: - workflow_dispatch for manual rebuilds - concurrency group: pages (cancel-in-progress: false) so a doc bump during deploy queues instead of cancelling - cp docs/CNAME -> site/CNAME instead of echo (docs/CNAME stays the single source of truth in the repo)
1 parent 7feb879 commit 3ccee8f

1 file changed

Lines changed: 16 additions & 26 deletions

File tree

.github/workflows/docs.yml

Lines changed: 16 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
name: Docs
1+
name: Documentation
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
paths:
78
- "docs/**"
89
- "zensical.toml"
@@ -19,33 +20,22 @@ concurrency:
1920
cancel-in-progress: false
2021

2122
jobs:
22-
build:
23-
name: Build Zensical site
23+
deploy:
24+
environment:
25+
name: github-pages
26+
url: ${{ steps.deployment.outputs.page_url }}
2427
runs-on: ubuntu-latest
2528
steps:
26-
- uses: actions/checkout@v4
29+
- uses: actions/configure-pages@v5
30+
- uses: actions/checkout@v5
2731
- uses: actions/setup-python@v5
2832
with:
29-
python-version: "3.12"
30-
- name: Install Zensical
31-
run: |
32-
python -m pip install --upgrade pip
33-
pip install zensical
34-
- name: Build
35-
run: zensical build
36-
- name: Copy CNAME to site root
37-
run: cp docs/CNAME site/CNAME
38-
- uses: actions/upload-pages-artifact@v3
33+
python-version: 3.x
34+
- run: pip install zensical
35+
- run: zensical build --clean
36+
- run: cp docs/CNAME site/CNAME
37+
- uses: actions/upload-pages-artifact@v4
3938
with:
4039
path: site
41-
42-
deploy:
43-
name: Deploy to GitHub Pages
44-
needs: build
45-
runs-on: ubuntu-latest
46-
environment:
47-
name: github-pages
48-
url: ${{ steps.deployment.outputs.page_url }}
49-
steps:
50-
- id: deployment
51-
uses: actions/deploy-pages@v4
40+
- uses: actions/deploy-pages@v4
41+
id: deployment

0 commit comments

Comments
 (0)