-
Notifications
You must be signed in to change notification settings - Fork 215
73 lines (60 loc) · 2.36 KB
/
template-buildwebsite.yml
File metadata and controls
73 lines (60 loc) · 2.36 KB
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
69
70
71
72
73
name: Build Website
on:
workflow_call:
inputs:
skipBuild:
required: false
default: false
type: boolean
vmImage:
required: false
default: 'ubuntu-latest'
type: string
defaults:
run:
shell: pwsh
jobs:
check: # This job ensures the template reports success even when we don't want it to build
name: "Check if build is required: ${{ !inputs.skipBuild }}"
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
build_website:
name: Build Website
needs: check
if: ${{ !inputs.skipBuild }}
runs-on: ${{ inputs.vmImage }}
steps:
- uses: actions/checkout@v3
- name: Spell-check docs
run: npx markdown-spellcheck "docs/*.md" "!docs/*-api-windows.md" --en-us --ignore-acronyms --ignore-numbers --report --color
- name: Spell-check versioned_docs
run: npx markdown-spellcheck "website/versioned_docs/**/*.md" "!website/versioned_docs/**/*-api-windows*.md" --en-us --ignore-acronyms --ignore-numbers --report --color
- name: Check unbroken exclusions file
run: ${{github.workspace}}/.github/scripts/CheckUnbrokenExclusions.ps1
- name: Check for Broken Links (Docs)
id: broken-links-docs
timeout-minutes: 15
continue-on-error: true
run: npx unbroken --parse-ids
working-directory: ./docs
- name: Warn if Broken Links (Docs) timed out
if: steps.broken-links-docs.outcome == 'failure' || steps.broken-links-docs.outcome == 'cancelled'
run: echo "::warning::Check for Broken Links (Docs) timed out or failed. Please manually run the job in your machine."
- name: Check for Broken Links (Website)
id: broken-links-website
if: success() || failure()
timeout-minutes: 15
continue-on-error: true
run: npx unbroken --parse-ids
working-directory: ./website
- name: Warn if Broken Links (Website) timed out
if: steps.broken-links-website.outcome == 'failure' || steps.broken-links-website.outcome == 'cancelled'
run: echo "::warning::Check for Broken Links (Website) timed out or failed. Please manually run the job in your machine."
- name: Yarn Install (Website)
if: success() || failure()
run: yarn install --frozen-lockfile
working-directory: ./website
- name: Yarn Build (Website)
run: yarn build
working-directory: ./website