-
Notifications
You must be signed in to change notification settings - Fork 19
53 lines (53 loc) · 1.63 KB
/
pr-preview.yml
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
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@v2
# Yes, we really want to checkout the PR
- run: |
git fetch origin pull/$GH_PR_NUM/head:tmp
git checkout tmp
- run: |
git rev-parse origin/v6
git rev-parse HEAD
git rev-parse origin/v6..HEAD
git log origin/v6..HEAD --format="%b"
# Yes, we really want to checkout the PR
# Injected by generate-workflows.js
- uses: actions/setup-node@v1
with:
node-version: '18'
- uses: actions/cache@v2
id: yarn-cache
name: Load npm deps from cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-14-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
if: steps.yarn-cache.outputs.cache-hit != 'true'
- run: yarn lint:js
name: Lint JS
if: always()
- run: yarn lint:md
name: Lint MD
if: always()
- run: yarn build
name: Build component groups
- uses: actions/cache@v2
id: docs-cache
name: Load webpack cache
with:
path: '.cache'
key: ${{ runner.os }}-v4-${{ hashFiles('yarn.lock') }}
- run: yarn build:docs
name: Build docs
- run: node .github/upload-preview.js packages/module/public
name: Upload docs
if: always()