-
Notifications
You must be signed in to change notification settings - Fork 18
47 lines (45 loc) · 1.39 KB
/
pr-preview.yml
File metadata and controls
47 lines (45 loc) · 1.39 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
39
40
41
42
43
44
45
46
47
name: pr-preview
on:
pull_request_target:
issue_comment:
types: [created]
jobs:
check-permissions:
uses: patternfly/.github/.github/workflows/check-team-membership.yml@main
secrets: inherit
deploy-preview:
runs-on: ubuntu-latest
needs: check-permissions
if: needs.check-permissions.outputs.allowed == 'true'
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
GH_PR_NUM: ${{ needs.check-permissions.outputs.pr-number }}
steps:
- uses: actions/checkout@v4
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: corepack enable
- uses: actions/cache@v4
id: yarn-cache
name: Cache yarn deps
with:
path: |
node_modules
**/node_modules
key: ${{ runner.os }}-yarn-22-${{ secrets.CACHE_VERSION }}-${{ hashFiles('yarn.lock') }}
- run: yarn install --immutable
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn build
name: Build
- run: yarn build:docs
name: Build docs
- name: Upload docs
uses: patternfly/.github/.github/actions/surge-preview@main
with:
folder: packages/module/public