-
Notifications
You must be signed in to change notification settings - Fork 8
50 lines (50 loc) · 1.36 KB
/
continuous-integration.yml
File metadata and controls
50 lines (50 loc) · 1.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
# Workflow for validating content structure and build integrity
name: Validate site and content
on:
# Runs on pushes targeting the default branch
push:
branches:
- main
# Runs on pull requests targeting the default branch
pull_request:
branches:
- main
jobs:
# YAML schema validation job
yaml-schema-validation:
name: Validate YAML files against schemas
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: 24
- name: Install dependencies
run: |
npm install yaml-ls-check
- name: Validate YAML files
run: |
npx yaml-ls-check .\articles
npx yaml-ls-check .\blogs
npx yaml-ls-check .\reference
# Build validation job
build-validation:
name: Validate Next.js build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci
- name: Build Next.js site
# Validate that the site builds successfully
#
# Use the built-in NPM script to build the site
run: npm run build