Skip to content

Commit

Permalink
chore(github-pages): fix permission
Browse files Browse the repository at this point in the history
  • Loading branch information
luwes committed Feb 26, 2024
1 parent 399a214 commit 6e7ed8a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ name: Node.js CI

on: [push, 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:
Expand Down Expand Up @@ -70,6 +64,11 @@ jobs:
- run: npm run build:standalone

deploy-preview:
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-preview
url: ${{ steps.deployment.outputs.page_url }}
Expand All @@ -87,7 +86,6 @@ jobs:
- run: npm run build:demo
- uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './demo'
- uses: actions/deploy-pages@v4
id: deployment

0 comments on commit 6e7ed8a

Please sign in to comment.