Repository navigation
71 lines (66 loc) · 2.45 KB
/
Copy pathdocs.yml
File metadata and controls
71 lines (66 loc) · 2.45 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
name: documentation
on:
push:
# feature branches are built through their pull request
branches: [develop, main]
pull_request:
branches: [develop, main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# a newer run supersedes the running one; a cancelled deployment leaves the
# published site as it was, the newer run deploys
cancel-in-progress: true
jobs:
docs:
# the name the branch protection requires, see .github/rulesets/
name: docs
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Configure GitHub Pages
uses: actions/configure-pages@v6
- name: Set up the environment
uses: ./.github/actions/setup
with:
python-version: "3.14"
sync: --extra dev
- name: Build the documentation
# the API reference is rendered from the docstrings by mkdocstrings,
# so the package has to be importable
run: uv run --no-sync zensical build --clean
- name: Generate the agent facing files
# llms.txt, llms-full.txt and the markdown of every page
run: uv run --no-sync python scripts/llms_txt.py
- name: Run the SBML Test Suite and write its report
# the interactive report is generated into the site and not committed,
# so the published one always describes the code it was built from.
# Only a build which can be published pays the three minutes: a pull
# request builds the site to check that it builds, it does not deploy
if: github.event_name != 'pull_request'
run: uv run --no-sync python scripts/testsuite.py report --output site/testsuite/report
- name: Upload the site
uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
needs: docs
# only the default branch publishes to https://matthiaskoenig.github.io/sbmlsim
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
pages: write # deploy to GitHub Pages
id-token: write # verify the deployment originates from this workflow
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5