From 1a3b54788b735b96ab30323156941923fba991e5 Mon Sep 17 00:00:00 2001 From: Ivan Schaller Date: Sun, 15 Jun 2025 22:49:34 +0200 Subject: [PATCH] add workflow to build docs --- .github/workflows/docs.yml | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..98a9c7b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,39 @@ +name: build docs + +on: + push: + tags: + - "v*.*.*" + + pull_request: + branches: [main, master] + + workflow_dispatch: + +jobs: + build-docs: + runs-on: ubuntu-latest + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: install hatch + run: pip install -r requirements.txt + + - name: get docs + run: ./script/get-docs + + - name: build docs + run: ./script/build-docs + + - name: deploy page + uses: peaceiris/actions-gh-pages@v4 + if: github.event_name != 'pull_request' + with: + publish_dir: docs/_build/html + github_token: ${{ secrets.GITHUB_TOKEN }}