-
Notifications
You must be signed in to change notification settings - Fork 68
51 lines (41 loc) · 1.24 KB
/
website.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
name: Website
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: enable corepack
run: corepack enable
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install packages
working-directory: './website'
run: yarn install --immutable
- name: Validate
working-directory: './website'
run: yarn build
# Borrowed from https://github.com/yarnpkg/berry/issues/4976#issue-1415019789
- name: Run yarn lint:yarn-dedupe
if: ${{ success() || failure() }}
working-directory: './website'
run: |
if ! yarn lint:yarn-dedupe; then
echo ''
echo ''
echo 'ℹ️ ℹ️ ℹ️'
echo 'Some dependencies can be deduplicated, which will make yarn.lock'
echo 'lighter and potentially save us from unexplainable bugs.'
echo 'Please run `yarn fix:yarn-dedupe` locally and commit yarn.lock.'
echo 'ℹ️ ℹ️ ℹ️'
exit 1
fi