-
Notifications
You must be signed in to change notification settings - Fork 32
68 lines (64 loc) · 1.84 KB
/
Copy pathdocumentation.yml
File metadata and controls
68 lines (64 loc) · 1.84 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
name: Documentation
"on":
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build-documentation:
name: Build documentation
runs-on: ubuntu-latest
container:
image: ghcr.io/4c-multiphysics/4c-minimal:main
options: --user root --env OMPI_ALLOW_RUN_AS_ROOT=1 --env OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1
defaults:
run:
shell: bash -l -eo pipefail {0}
steps:
- uses: actions/checkout@v7
- uses: ./.github/actions/setup-queens-pixi
with:
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
environments: dev
activate-environment: dev
- name: Create links to 4C
run: |
ln -s /home/user/4C/bin/ config/4C_build
- name: Register Jupyter kernel
run: |
python -m ipykernel install --user --name queens --display-name "Python (queens)"
- name: Install xvfb
run: |
apt-get update
apt-get install -y xvfb
- name: Sphinx build
env:
PYTHONPATH: ${{ github.workspace }}
run: |
set -x
sphinx-apidoc -o doc/source src/ -fMT
cd doc
xvfb-run -a sphinx-build -b html -d build/doctrees source build/html -W
- name: Upload html
uses: actions/upload-pages-artifact@v5
with:
path: doc/build/html
retention-days: 1
deploy-documentation:
name: Deploy documentation
needs: build-documentation
if: ${{github.ref == 'refs/heads/main'}}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5