-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (41 loc) · 1.1 KB
/
docs-build.yaml
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
# Builds the Sphinx documentation
name: Docs Build
on:
pull_request:
branches: [main]
paths:
- docs/**
- cneuromax/**
- .github/workflows/docs-build.yaml
jobs:
docs-build:
runs-on: self-hosted
steps:
- name: Checkout the GitHub repo
uses: actions/checkout@v4
- name: Build the CNeuroMax image
run: podman build -t cneuromod/cneuromax:docs -f Dockerfile .
- name: Build the documentation
run: >
podman run --rm -v $PWD:/cneuromax -w /cneuromax
cneuromod/cneuromax:docs
sphinx-build -b html ./docs/ ./docs/build/
- name: Upload the documentation as an artifact
uses: actions/upload-artifact@v4
with:
name: docs
path: ./docs/build/
deploy:
needs: docs-build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: self-hosted
steps:
- name: Deploy to Github Pages
uses: actions/deploy-pages@v4
with:
artifact_name: docs