Skip to content

Update pr-preview.yml to add required permissions #98

Update pr-preview.yml to add required permissions

Update pr-preview.yml to add required permissions #98

Workflow file for this run

name: Deploy PR previews to GitHub Pages
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
permissions:
# Used by `pr-preview-action` to push pr preview build files to related branch
contents: write
# Used by `pr-preview-action` to leave a comment on the PR with the preview link
pull-requests: write
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies and build storybook
run: |
npm install
npm run storybook:build
- name: Deploy storybook build to GitHub Pages
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./public/