From 0d72bb680d83e0e95df4b7ecee4f7e1e3585861d Mon Sep 17 00:00:00 2001 From: Rafael Zimmer Date: Sun, 1 Dec 2024 16:53:00 -0300 Subject: [PATCH] Added actions for auto doc deploy --- .github/workflows/docs.yml | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 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..b141343 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,55 @@ +name: Deploy Sphinx Docs to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install sphinx sphinx-book-theme sphinx-autodoc-typehints myst-parser + + - name: Build Sphinx Documentation + run: | + cd docs + make html + + - name: Upload Sphinx Build Artifact + if: ${{ env.SKIP_ARTIFACT_UPLOAD != 'true' }} + uses: actions/upload-pages-artifact@v3 + with: + path: docs/_build/html + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 \ No newline at end of file