forked from aws-otel/aws-otel.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.09 KB
/
pr.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
name: PR Build
on:
pull_request:
branches:
- main
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
check-latest: true
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm ci
- run: npm run build
env:
GH_API_KEY: ${{ secrets.GITHUB_TOKEN }}
- name: Upload site as actions artifact
if: ${{ runner.os == 'Linux' }}
uses: actions/upload-artifact@v2
with:
name: site
path: public