-
-
Notifications
You must be signed in to change notification settings - Fork 52
50 lines (42 loc) · 1.06 KB
/
pr-preview.yaml
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
on: [pull_request]
name: PR preview
jobs:
build:
name: Generate PR preview
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: 'blob:none'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: "npm"
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Build the project
run: npm run build
- name: Upload HTML artifact
uses: actions/upload-artifact@v4
with:
name: website-html
path: dist
retention-days: 1
- name: Upload Functions artifact
uses: actions/upload-artifact@v4
with:
name: website-functions
path: functions
retention-days: 1
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: website-package
path: |
package.json
package-lock.json
retention-days: 1