Skip to content

Commit

Permalink
move github permissions declaration to the job where it's needed for
Browse files Browse the repository at this point in the history
clarity
  • Loading branch information
yuhonas committed Aug 9, 2023
1 parent dbdf8d2 commit a4cb897
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
Expand Down Expand Up @@ -56,6 +50,11 @@ jobs:

deploy:
if: github.event.pull_request.merged == true
# Sets the GITHUB_TOKEN permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit a4cb897

Please sign in to comment.