forked from patternfly/patternfly-org
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (59 loc) · 1.88 KB
/
pr-preview.yml
File metadata and controls
59 lines (59 loc) · 1.88 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
48
49
50
51
52
53
54
55
56
57
58
59
### WARNING -- this file was generated by generate-workflows.js
name: pr-preview
on: pull_request_target
jobs:
build-upload:
runs-on: ubuntu-latest
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
GH_PR_NUM: ${{ github.event.number }}
steps:
- uses: actions/checkout@v4
# Yes, we really want to checkout the PR
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
# Injected by generate-workflows.js
- uses: actions/setup-node@v4
with:
node-version: 22
- run: corepack enable
- run: yarn install --immutable
- uses: actions/cache@v4
id: site-cache
name: Load rspack cache
with:
path: "packages/documentation-site/.cache"
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn build
name: Build docs
- run: node .github/upload-preview.js build/patternfly-org/site site
name: Upload docs
build-upload-astro:
runs-on: ubuntu-latest
env:
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
GH_PR_TOKEN: ${{ secrets.GH_PR_TOKEN }}
GH_PR_NUM: ${{ github.event.number }}
steps:
- uses: actions/checkout@v4
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
# Injected by generate-workflows.js
- uses: actions/setup-node@v4
with:
node-version: 22
- run: corepack enable
- run: yarn install --immutable
- uses: actions/cache@v4
id: site-cache
name: Load rspack cache
with:
path: "packages/documentation-site/.cache"
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- run: yarn build:doc-core
name: Build astro docs