From f2c06ec8369d14114b98a5f8929e4dac97809211 Mon Sep 17 00:00:00 2001 From: Nicholas Ellul Date: Fri, 18 Oct 2024 11:30:20 -0400 Subject: [PATCH 1/3] Update publishing token used for gh-pages deployments --- .github/workflows/publish-docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 5fc4c192..cad164ea 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -41,6 +41,6 @@ jobs: - name: Deploy to `${{ inputs.destination_dir }}` directory of `gh-pages` branch uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.DEPLOY_TOKEN }} publish_dir: ./docs destination_dir: ${{ inputs.destination_dir }} From 4661107232920eb9d601900a12505bbb3a16aec4 Mon Sep 17 00:00:00 2001 From: Nicholas Ellul Date: Fri, 18 Oct 2024 16:03:59 +0000 Subject: [PATCH 2/3] Remove write permission from action as updated token will provide access --- .github/workflows/publish-docs.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index cad164ea..4809eb65 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -11,8 +11,6 @@ jobs: publish-docs-to-gh-pages: name: Publish docs to GitHub Pages runs-on: ubuntu-latest - permissions: - contents: write steps: - name: Ensure `destination_dir` is not empty if: ${{ inputs.destination_dir == '' }} From b9ad10be48d355f6ba02ab478377db5bfe27cfcb Mon Sep 17 00:00:00 2001 From: Nicholas Ellul Date: Fri, 18 Oct 2024 12:49:40 -0400 Subject: [PATCH 3/3] Update publish-docs environment --- .github/workflows/publish-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 4809eb65..5cfaffb4 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -11,6 +11,7 @@ jobs: publish-docs-to-gh-pages: name: Publish docs to GitHub Pages runs-on: ubuntu-latest + environment: github-pages steps: - name: Ensure `destination_dir` is not empty if: ${{ inputs.destination_dir == '' }} @@ -39,6 +40,6 @@ jobs: - name: Deploy to `${{ inputs.destination_dir }}` directory of `gh-pages` branch uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 with: - github_token: ${{ secrets.DEPLOY_TOKEN }} + personal_token: ${{ secrets.DEPLOY_TOKEN }} publish_dir: ./docs destination_dir: ${{ inputs.destination_dir }}