diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index b68e73b00..558a5cdc6 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -6,12 +6,6 @@ on: - main # Set a branch to deploy pull_request: -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. concurrency: @@ -22,6 +16,11 @@ jobs: # Build job build: runs-on: ubuntu-latest + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + contents: read + pages: write + id-token: write steps: - uses: actions/checkout@v4 with: @@ -48,6 +47,11 @@ jobs: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest + # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages + permissions: + contents: read + pages: write + id-token: write needs: build steps: - name: Deploy to GitHub Pages