Repository navigation
51 lines (44 loc) · 1.58 KB
/
Copy pathci.yml
File metadata and controls
51 lines (44 loc) · 1.58 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
name: Validate catalog
# No path filters: the build reads catalog/, stacks/, docs/, site/ and the
# top-level Markdown files, and the whole run takes seconds.
#
# Runs on pull requests, and as the first job of pages.yml on every push to
# main (so a push builds once, not three times). With `upload-dist` the
# checkout has full history (the sitemap's lastmod dates come from git) and
# the built site is uploaded as the Pages artifact for pages.yml to deploy.
on:
pull_request:
workflow_call:
inputs:
upload-dist:
description: Build with full git history and upload site/dist as the Pages artifact
type: boolean
default: false
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: ${{ inputs.upload-dist && '0' || '1' }}
- name: Setup Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
- name: Test catalog checks
run: node site/checks.test.mjs
- name: Test site build modules
run: node site/lib/lib.test.mjs
- name: Validate catalog
run: node site/validate.mjs
- name: Build site and check pages
run: node site/build.mjs
- name: Upload Pages artifact
if: ${{ inputs.upload-dist }}
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: site/dist