name: Deploy preview docs from PR concurrency: group: preview-${{ github.ref }} cancel-in-progress: true on: pull_request: types: - opened - reopened - synchronize # `pr-preview-action` assumes by default that the preview should be removed during the closed event, # which it only sees if you explicitly add it to the workflow. - closed jobs: deploy-preview: runs-on: ubuntu-latest env: GITHUB_PULL_REQUEST_PREVIEW: 'true' PUBLIC_PATH: /pr-preview/pr-${{ github.event.pull_request.number }}/ steps: - uses: actions/checkout@v6 - uses: pnpm/action-setup@v6 - name: Install Node 24 uses: actions/setup-node@v6 with: node-version: '24' cache: 'pnpm' - name: Install and bootstrap run: pnpm install --frozen-lockfile && pnpm run bootstrap if: github.event.action != 'closed' # don't run install and bootstrap unnecessarily when pr is closed - name: Build docs-app run: pnpm run build:docs if: github.event.action != 'closed' - uses: rossjrw/pr-preview-action@v1 with: source-dir: ./packages/__docs__/__build__ preview-branch: gh-pages umbrella-dir: pr-preview pages-base-url: instructure.design action: auto