From 13a4e9e39b204ac5dd9cda5aa66ef63b3d01f50f Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Tue, 6 Jun 2023 18:19:00 -0700 Subject: [PATCH] build with github action --- .github/workflows/sphinx.yml | 38 ++++++++++++++++++++++++++++++++++++ src/conf.py | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sphinx.yml diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml new file mode 100644 index 0000000..514966a --- /dev/null +++ b/.github/workflows/sphinx.yml @@ -0,0 +1,38 @@ +name: Deploy +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write # To push a branch + pull-requests: write # To create a PR from that branch + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install poetry + uses: snok/install-poetry@v1.5.1 + with: + virtualenvs-create: true + virtualenvs-in-project: true + - name: Load cached venv + id: cached-poetry-dependencies + uses: actions/cache@v2 + with: + path: .venv + key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} + - name: Install dependencies + run: poetry install + if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' + - name: build docs + run: make html + - name: deploy to gh-pages + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: build/html + + diff --git a/src/conf.py b/src/conf.py index 0b9a313..15e9a0d 100644 --- a/src/conf.py +++ b/src/conf.py @@ -31,7 +31,7 @@ exclude_patterns = [] html_theme = 'furo' html_static_path = ['_static'] - +html_baseurl = '/docs/' # ----------- # Extension config