Commit b41fad0
authored
Fix the GitHub Pages deployment (docs + dashboard) (#11)
Fixes the GitHub Pages deployment added in #10, which failed on
`master`.
## Two bugs
1. **`lake: No such file or directory`** — `pages.yml` installed elan
*after* the docs step, but docgen-action's build script invokes
`~/.elan/bin/lake` directly. Install elan first.
2. **`409 Conflict` on the `github-pages` artifact** — docgen-action@v1
runs `upload-pages-artifact` on *every push* regardless of its `deploy`
input (only its `deploy-pages` step honours the flag). So the workflow's
own `upload-pages-artifact` was a second `github-pages` artifact and
collided.
## Fix
Since GitHub Pages allows only one deployment per repo and docgen-action
insists on uploading its `docs/` directory, let docgen own the single
upload + deploy instead of deploying separately. The workflow now:
1. builds the dashboard (chapter with Lean v4.32.0-rc1, Verso site with
v4.31.0),
2. drops it into docgen's output dir (`docs/dashboard`) and adds a
landing `docs/index.html`,
3. runs `docgen-action` (`build-page: false`), which builds the API docs
into `docs/docs` and uploads + deploys the whole `docs/` tree.
Resulting site: landing page at `/`, API docs at `/docs`, dashboard at
`/dashboard`.
(docgen's `build_docs.sh` only does `mkdir -p docs` + `cp … docs/docs`,
no `rm`, so the pre-placed dashboard survives.)
## Before merging
This branch is set up so the site can be deployed and tested from it.
Remove the temporary bits before/after merge:
- [ ] remove `fix-pages-deploy` from the `push:` trigger in `pages.yml`;
- [ ] remove the `fix-pages-deploy` branch from the `github-pages`
environment's deployment-branch policies.
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent c813747 commit b41fad0
1 file changed
Lines changed: 22 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
| 29 | + | |
| 30 | + | |
37 | 31 | | |
38 | 32 | | |
39 | 33 | | |
40 | 34 | | |
41 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | | - | |
45 | | - | |
| 50 | + | |
46 | 51 | | |
47 | 52 | | |
48 | 53 | | |
49 | 54 | | |
| 55 | + | |
50 | 56 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
58 | | - | |
| 61 | + | |
59 | 62 | | |
60 | 63 | | |
61 | 64 | | |
| |||
0 commit comments