-
Notifications
You must be signed in to change notification settings - Fork 71
68 lines (56 loc) · 1.63 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Build and Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v2
# Setup node with version and cache dependencies
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18.12.0'
cache: 'yarn'
# Cache Docusaurus build artifacts for faster build times
- name: Cache Docusaurus artifacts
uses: actions/cache@v3
with:
key: ${{ runner.os }}-docusaurus-${{ hashFiles('**/yarn.lock') }}
path: |
.docusaurus
build
# Cache node_modules for faster build times
- name: Cache node_modules
uses: actions/cache@v3
with:
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
path: node_modules
# Install project dependencies
- run: yarn install --frozen-lockfile
# Build the Docusaurus project
- run: yarn build
lintChecks:
needs: build
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v2
# Check links in markdown files
- name: Link Checker
uses: lycheeverse/lychee-action@v1
with:
args: --verbose --no-progress './docs/'
fail: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
# Check spelling in markdown files using cspell
- name: Spell Checker using cspell
uses: streetsidesoftware/cspell-action@v1
with:
config: './cspell.json'