forked from Converg3nce/matic-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (49 loc) · 1.57 KB
/
build.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
54
name: Doc build
on:
pull_request:
branches: [ master ]
paths:
- 'docs/**'
- 'i18n/**'
jobs:
build:
strategy:
matrix:
locale: ['en', 'ko', 'de', 'es', 'fr', 'it', 'ja', 'pt', 'br', 'hi', 'id', 'ru', 'th', 'tl']
runs-on: ubuntu-latest-8-cores
env:
CI: true
NODE_OPTIONS: --max-old-space-size=16384
DOCUSAURUS_SSR_CONCURRENCY: 5
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "16.14.1"
cache: 'npm'
- name: Cache Docusaurus artifacts
id: cache-docusaurus
uses: actions/cache@v3
with:
key: ${{ runner.os }}-build-docusaurus
path: |
.docusaurus
build
- if: ${{ steps.cache-docusaurus.outputs.cache-hit != 'true' }}
name: State of Docusaurus cache
continue-on-error: true
run: echo "Docusaurus cache miss, resulting build will be slower"
- name: Cache node_modules
id: cache-node-modules
env:
cache-name: cache-node-modules
uses: actions/cache@v3
with:
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
path: node_modules
- if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }}
name: State of node_modules cache
continue-on-error: true
run: echo "Package dependencies changed, unable to use node_modules cache"
- run: yarn install --frozen-lockfile
- run: yarn build --locale ${{ matrix.locale }}