Skip to content

Commit dab18f7

Browse files
committed
ci: Add GitHub Actions workflow for docs deployment
Builds Verso documentation and deploys to GitHub Pages on push to main. After pushing, enable GitHub Pages in repo settings: Settings > Pages > Source: GitHub Actions 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 29112ec commit dab18f7

1 file changed

Lines changed: 63 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Install elan
25+
run: |
26+
curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y --default-toolchain none
27+
echo "$HOME/.elan/bin" >> $GITHUB_PATH
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: '20'
33+
34+
- name: Get Mathlib cache
35+
run: lake exe cache get || true
36+
37+
- name: Build LeanPlot
38+
run: lake build
39+
40+
- name: Build documentation
41+
run: lake build leanplot-docs
42+
43+
- name: Generate documentation
44+
run: .lake/build/bin/leanplot-docs
45+
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v4
48+
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: '_out/docs/html-multi'
53+
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)