Skip to content

Commit

Permalink
test: site and links (#2656)
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinAbro321 authored Jun 25, 2024
2 parents b72d4c8 + 7867013 commit f039c60
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 9 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test Site
on:
pull_request:

permissions:
contents: read

# Abort prior jobs in the same workflow / PR
concurrency:
group: site-${{ github.ref }}
cancel-in-progress: true

jobs:
validate:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./site
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2

- name: npm ci
run: npm ci

- name: run site build
run: npm run build

- name: check links
run: npm run link-check
4 changes: 3 additions & 1 deletion site/hack/copy-examples.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { promises as fs } from "fs";
import path from "path";
import yaml from "yaml";
import { fileURLToPath } from 'url';

const __dirname = import.meta.dirname;
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const examplesDir = path.join(__dirname, "../../examples");
const dstDir = path.join(__dirname, "../src/content/docs/ref/Examples");
Expand Down
2 changes: 1 addition & 1 deletion site/linkinator.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"skip": "^(https://.*github.com)",
"skip": "^(https://.*)",
"verbosity": "error"
}
18 changes: 11 additions & 7 deletions site/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f039c60

Please sign in to comment.