Skip to content

Update build_documentation.yml #57

Update build_documentation.yml

Update build_documentation.yml #57

name: documentation
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install Conda
run: |
sudo apt-get update
sudo apt-get install -y wget
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda init bash
source ~/.bashrc
- name: Create and activate Conda environment
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda env create -f bayesian-illumination.yml
pip install sphinx sphinx_rtd_theme myst_parser nbsphinx sphinx_copybutton furo
conda activate bayesian-illumination
- name: Sphinx build
run: |
source $HOME/miniconda/etc/profile.d/conda.sh
conda activate bayesian-illumination
sphinx-build docs/source _build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true