diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 4b52f78..aec8db0 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-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 @@ -52,6 +54,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 }}