From 7981b4784658ae420ded8149820a77f620b8f009 Mon Sep 17 00:00:00 2001 From: Johan Larsson Date: Wed, 29 Nov 2023 15:43:30 +0100 Subject: [PATCH] feat: add a docs workflow --- .github/workflows/build-docs.yaml | 48 +++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/build-docs.yaml diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml new file mode 100644 index 0000000..2893180 --- /dev/null +++ b/.github/workflows/build-docs.yaml @@ -0,0 +1,48 @@ +name: build-docs +on: + push: + branches: [main] + + workflow_dispatch: + +permissions: + contents: write + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build-docs: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + + - name: Install python dependencies + run: python -m pip install sphinx sphinx-rtd-theme sphinx-sitemap + + - name: Build documentation + run: | + sphinx-apidoc -o docs/source sortedl1 + cd docs + make html + + - name: Setup pages + uses: actions/configure-pages@v3 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: "docs/build/html/" + + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2