name: Build & Deploy on: push: pull_request: workflow_dispatch: jobs: # Build job build: # Specify runner + build & upload the static files as an artifact runs-on: python@latest steps: - name: Checkout code id: checkout-code uses: actions/checkout@v3 - name: Install dependencies id: install run: | python -m pip install --upgrade pip pip install mkdocs mkdocstrings mkdocs-material - name: Build docs id: build run: | mkdocs build - name: Upload static files as artifact id: deployment uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action with: path: site/ # Deployment job deploy: # Grant GITHUB_TOKEN the permissions required to make a Pages deployment permissions: pages: write # to deploy to Pages id-token: write # to verify the deployment originates from an appropriate source 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