From 81dc79f552fba9d17a3f3222f683b0388d59aa49 Mon Sep 17 00:00:00 2001 From: juftin Date: Tue, 9 Jan 2024 22:21:13 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20docs=20deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release.yaml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 015394f..5d8f746 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -46,7 +46,11 @@ jobs: needs: release if: github.ref == 'refs/heads/main' && github.repository_owner == 'juftin' permissions: - contents: write + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} steps: - name: Checkout Latest Changes uses: actions/checkout@v4 @@ -54,7 +58,7 @@ jobs: ref: ${{ github.ref }} fetch-depth: 0 - name: Set up Python Environment - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.11" - name: Install Hatch @@ -63,9 +67,16 @@ jobs: python -m pip install -q hatch pre-commit python -m pip install -q "${{ github.workspace }}" hatch --version - - name: Set Up GitHub Actions User - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - - name: Deploy Documentation Changes - run: hatch run docs:gh-deploy --force + - name: Create Virtual Environment + run: hatch env create docs + - name: Build Site + run: hatch run docs:build + - name: Setup GitHub Pages + uses: actions/configure-pages@v4 + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: site/ + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4