diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 48cb08fd..d57b1ae6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -30,3 +30,35 @@ jobs: PYPI_TEST_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }} run: | make publish -e PYPI_USERNAME=$PYPI_USERNAME -e PYPI_PASSWORD=$PYPI_PASSWORD -e PYPI_TEST_PASSWORD=$PYPI_TEST_PASSWORD + + deploy-docs: + needs: build + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: 🛎️ Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 🐍 Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.8' + + - name: 📚 Install MkDocs and dependencies + run: | + python -m pip install --upgrade pip + pip install mkdocs-material mkdocstrings mkdocstrings[python] + pip install ".[dev]" + + - name: 🏗️ Build documentation + run: | + mkdocs build + + - name: 🚀 Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site