diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index b89320d..92d9a1e 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -11,10 +11,12 @@ on: pull_request: workflow_dispatch: +# The build needs nothing beyond the source and the Pages configuration it +# reads to compute the base URL. Publishing rights are granted to the deploy +# job alone, below, so a pull request build cannot replace what is served. permissions: contents: read - pages: write - id-token: write + pages: read concurrency: group: pages @@ -54,6 +56,10 @@ jobs: if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' needs: build runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}