Skip to content

docs

docs #253

Workflow file for this run

# This workflow builds the docs for rivgraph
name: docs
on:
push:
paths:
- "docs/**"
pull_request:
schedule:
- cron: '0 0 1 * *' # run workflow at 12AM on first day of every month
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- uses: mamba-org/setup-micromamba@v1
with:
python-version: '3.9'
mamba-version: "*"
channels: conda-forge, defaults
environment-file: environment.yml
init-shell: bash
- name: Install RivGraph, dependencies, and Sphinx then build docs
shell: bash -l {0}
run: |
conda activate rivgraph
python setup.py install
python -m pip install --upgrade pip
pip install sphinx
sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng
pip install sphinx-rtd-theme
pip install sphinx-gallery
pip install ipython
pip install ipykernel
(cd docs && make docs)
(cd docs && make html)
- name: Debug
run: |
echo $REF
echo $EVENT_NAME
echo ${{ github.event_name == 'push' }}
echo ${{ github.ref == 'refs/heads/master' }}
echo ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.7.1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
BRANCH: gh-pages
FOLDER: docs/build/html