-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (39 loc) · 1.62 KB
/
build_docs.yml
File metadata and controls
42 lines (39 loc) · 1.62 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
name: Build and Deploy Sphinx Docs
on:
push:
branches:
- main # trigger on pushes to the main branch
jobs:
build:
runs-on: ubuntu-24.04 # Specify the operating system
steps:
- uses: actions/checkout@v4 # Checkout the repository
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # Specify your Python version
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libeigen3-dev libfftw3-dev libhdf5-dev libopenmpi-dev libomp-dev python3-numpy python3-venv python3-ipython ipython3 doxygen graphviz cmake make pandoc
python3 -m venv .venv # Create a virtual environment
source .venv/bin/activate # Activate the environment
pip install sphinx sphinx-rtd-theme # Install Sphinx and theme
pip install -r requirements.txt # Install any additional dependencies (optional)
- name: Build Sphinx documentation
run: |
source .venv/bin/activate # Activate the environment
make html # Build the HTML documentation
- name: Upload built documentation (optional)
uses: actions/upload-artifact@v4
with:
name: html-docs
path: _build/html # Path to your built documentation
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html
force_orphan: true