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