-
Notifications
You must be signed in to change notification settings - Fork 212
72 lines (62 loc) · 1.92 KB
/
publish_docs.yaml
File metadata and controls
72 lines (62 loc) · 1.92 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: Release Documentation
on:
push:
branches:
- main
paths:
- "docs/**"
- "version.txt"
workflow_dispatch:
concurrency:
group: release-docs-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy-github-pages:
runs-on: ubuntu-latest
if: github.repository == 'sgl-project/specforge' || github.repository == 'sleepcoo/SpecForge'
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: docs/spec_bundle/package-lock.json
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y pandoc parallel retry
pip install -r docs/requirements.txt
- name: Build spec bundle dashboard
run: |
# Copy logos to public directory
cp assets/logo.png docs/spec_bundle/public/logo.png
cp docs/_static/imgs/specbundle-logo.png docs/spec_bundle/public/specbundle-logo.png
cd docs/spec_bundle
npm ci
npm run build
# Clean up node_modules to prevent Sphinx from processing them
rm -rf node_modules
cd ..
- name: Build documentation
run: |
cd docs
make compile
make html
# Copy SpecBundle to root of output directory
mkdir -p _build/html/SpecBundle
cp -r spec_bundle/dist/* _build/html/SpecBundle/
- name: Add .nojekyll file
run: |
touch ./docs/_build/html/.nojekyll
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html