-
Notifications
You must be signed in to change notification settings - Fork 10
72 lines (54 loc) · 1.57 KB
/
cd.yaml
File metadata and controls
72 lines (54 loc) · 1.57 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Continuous Delivery
on:
push:
branches: [main]
workflow_dispatch:
jobs:
emit:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Zig
uses: mlugg/setup-zig@v2
with:
version: 0.16.0
use-cache: false
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install pdoc
run: pip install pdoc
- name: Build Python extension
run: |
cd bindings/python
pip install -e .
- name: Create docs directory structure
run: mkdir -p zig-out/doc/zig zig-out/doc/python
- name: Generate Zig documentation
run: |
zig build doc
mv zig-out/doc/*.* zig-out/doc/zig/ 2>/dev/null || true
mv zig-out/doc/src zig-out/doc/zig/ 2>/dev/null || true
- name: Generate Python documentation
run: pdoc bindings/python/astroz -o zig-out/doc/python
- name: Create landing page
run: cp .github/landing_page.html zig-out/doc/index.html
- name: Upload artifact for GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: zig-out/doc/
deploy:
needs: emit
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4