-
Notifications
You must be signed in to change notification settings - Fork 224
53 lines (40 loc) · 1.11 KB
/
build-and-test.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: Build and Test
on:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js 18 environment
uses: actions/setup-node@v3
with:
node-version: 'lts/hydrogen'
- name: Install root dependencies
uses: bahmutov/npm-install@v1
- name: Check if the page builds
run: npm run-script build
- name: Zip build
run: zip -r public.zip public -x "public/assets/screenshots/*" "public/assets/img/blog/*" "public/assets/img/science/*"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: public
retention-days: 1
path: public.zip
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Setup Node.js 18 environment
uses: actions/setup-node@v3
with:
node-version: 'lts/hydrogen'
- name: Install npm dependencies
run: npm ci
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: public
- name: Unzip build
run: unzip public.zip