-
Notifications
You must be signed in to change notification settings - Fork 110
38 lines (38 loc) · 1.27 KB
/
Copy pathpreview.yml
File metadata and controls
38 lines (38 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy preview docs from PR
concurrency: preview-${{ github.ref }}
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