From c026da079252dc45138e1acbb2e53ca7f2378970 Mon Sep 17 00:00:00 2001 From: Mark Stephenson Date: Thu, 4 Jan 2024 23:39:41 -0800 Subject: [PATCH] Issue #17: Autogeneration of docs --- .github/workflows/documentation.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..48380cd6 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,42 @@ +name: Documentation + +on: + push: + branches: + - develop + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: write + pages: write + id-token: write + + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + with: + python-version: '3.10' + - name: Mock Basilisk + run: | + cp docs/sitecustomize.py $(python -c 'import site; print(site.getsitepackages()[0])')/sitecustomize.py + - name: Install dependencies + run: | + pip install -e . + # skip finish install steps + - name: Sphinx build + run: | + cd docs + make html + cd .. + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build/html + force_orphan: true + +