From 8aa39f1e41b33d6b3ffe11ef69bc6de877a01498 Mon Sep 17 00:00:00 2001 From: Dan Dye Date: Fri, 25 Apr 2025 19:49:57 -0400 Subject: [PATCH 1/3] refactor gh action to pub docs --- .github/workflows/deploy-docs.yml | 40 ++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index ab7d2273..d0b726fe 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -8,11 +8,20 @@ on: - 'docs/**' # Trigger only on changes within the docs directory workflow_dispatch: # Allows manual triggering +# Required for GitHub Pages API deployment permissions: - contents: write # Needed to push to gh-pages branch + contents: read + pages: write # Needed to push to gh-pages branch + id-token: write + +# Allow only one concurrent deployment +concurrency: + group: "pages" + cancel-in-progress: false + jobs: - deploy-docs: + build-docs: runs-on: ubuntu-latest steps: - name: Checkout repository @@ -44,19 +53,22 @@ jobs: # Run make html inside the docs directory make -C docs html - - name: Create .nojekyll file + - name: Create .nojekyll file again run: | touch docs/_build/html/.nojekyll - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/_build/html # Directory containing the built HTML - publish_branch: gh-pages # Target branch - force_orphan: true # Creates a clean history for the gh-pages branch - # Optional: Configure user for commits - # user_name: 'github-actions[bot]' - # user_email: 'github-actions[bot]@users.noreply.github.com' - # Optional: Commit message - # commit_message: ${{ github.event.head_commit.message }} + path: docs/_build/html + + deploy: + needs: build-docs + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From 54d68fdffee840c47cf8bb9e0fcf7e3968488b9d Mon Sep 17 00:00:00 2001 From: Dan Dye Date: Fri, 25 Apr 2025 19:51:35 -0400 Subject: [PATCH 2/3] rm extraneous space in yaml --- .github/workflows/deploy-docs.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index d0b726fe..a32b29ea 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -62,13 +62,13 @@ jobs: with: path: docs/_build/html - deploy: - needs: build-docs - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + deploy: + needs: build-docs + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 From d57bf7b04f4cc3d50335f757755ee7212cb81244 Mon Sep 17 00:00:00 2001 From: Dan Dye Date: Fri, 25 Apr 2025 20:03:15 -0400 Subject: [PATCH 3/3] rm extraneous newline in yaml --- .github/workflows/deploy-docs.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index a32b29ea..975b6797 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -19,7 +19,6 @@ concurrency: group: "pages" cancel-in-progress: false - jobs: build-docs: runs-on: ubuntu-latest