-
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.14 KB
/
prcheck.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
name: React Build Check
permissions:
contents: write
actions: write
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.ACTIONS_TOKEN }}
- name: Determine Workflow Branch
run: echo "TARGET_BRANCH=${{ github.event.pull_request.head.ref || github.ref_name }}" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install dependencies
run: npm i
- name: Build React app
run: CI=true npm run build
- name: Upload post-build repo state
uses: actions/upload-artifact@v4
with:
name: "Repo after Build"
path: ./
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build
- name: Upload extra artifacts
uses: actions/upload-artifact@v4
with:
name: webpify-results
path: ./webp-conversion-results.json