-
-
Notifications
You must be signed in to change notification settings - Fork 0
executable file
·52 lines (42 loc) · 1.12 KB
/
Copy pathdocs.yaml
File metadata and controls
executable file
·52 lines (42 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: docs
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
env:
# Keep in step with test.yml's pin -- docs runs `mojo doc`, which compiles the
# sources and so breaks on the same stdlib changes the tests do.
MOJO_VERSION: "1.0.0"
jobs:
build-deploy:
runs-on: ubuntu-latest
timeout-minutes: 15
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install Mojo
run: |
uv venv
uv pip install "mojo==$MOJO_VERSION"
- name: Generate API reference
run: |
.venv/bin/mojo doc -o docs/api.json -I src src/diff
python3 docs/render_api.py docs/api.json docs/site/index.html
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: docs/site
- name: Deploy to GitHub Pages
id: deploy
uses: actions/deploy-pages@v4