Skip to content

Update action config to main branch #19

Update action config to main branch

Update action config to main branch #19

Workflow file for this run

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