diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000..e2ad0aa1 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,51 @@ +name: Deploy mkdocs site to Pages + +on: + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +jobs: + # Build job + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - uses: snok/install-poetry@v1 + - uses: extractions/setup-just@v2 + - name: Install dependencies + run: | + just install + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Build with mkdocs + run: mkdocs build + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./site + + # 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