Skip to content

Commit 8f2685d

Browse files
committed
copy from presentations
1 parent 92c4545 commit 8f2685d

5 files changed

Lines changed: 105 additions & 3 deletions

File tree

.editorconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
charset = utf-8
7+
trim_trailing_whitespace = true
8+
insert_final_newline = true
9+
10+
[*.md]
11+
trim_trailing_whitespace = false

.github/workflows/lychee.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ name: "Lychee"
55
on:
66
workflow_dispatch:
77
push:
8-
branches: ["main"]
8+
branches: [ "master", "main" ]
99
paths: [".github/workflows/lychee.yaml"]
1010
schedule:
1111
- cron: "0 0 * * *"
@@ -25,12 +25,24 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v4
2727

28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: "20.19.4"
32+
cache: npm
33+
34+
- name: install
35+
run: npm ci
36+
37+
- name: build
38+
run: npm run build
39+
2840
- name: Scan for broken links
2941
uses: lycheeverse/lychee-action@v1
3042
id: lychee
3143
with:
3244
token: "${{ secrets.GITHUB_TOKEN }}"
33-
args: --verbose --no-progress 'src/**/*.md' 'src/**/*.mdx' 'README.md'
45+
args: --no-progress --base _site --exclude https://fonts.gstatic.com/ --exclude https://fonts.googleapis.com/ '_site'
3446
output: "${{ env.LYCHEE_OUTPUT }}"
3547
debug: true
3648

.github/workflows/pa11y.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
3+
name: pa11y tests
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches: [ "master", "main" ]
9+
10+
permissions:
11+
issues: write
12+
13+
env:
14+
WORKFLOW_ISSUE_TITLE: "Pa11y Checker Dashboard 🔗"
15+
16+
jobs:
17+
build:
18+
name: Building site and running pa11y-ci tests
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout source.
23+
uses: actions/checkout@v2
24+
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: "20.19.4"
29+
cache: npm
30+
31+
- name: install
32+
run: npm ci
33+
34+
- name: build
35+
run: npm run build
36+
37+
- name: serve
38+
run: npx serve -l 3000 _site &
39+
40+
- name: Run pa11y-ci.
41+
continue-on-error: true
42+
run: npx pa11y-ci --sitemap http://localhost:3000/sitemap.xml -f https://presentations.gavinmogan.com -r http://localhost:3000 2>&1 | tee pa11y_output.txt
43+
44+
- name: Find Link Checker Issue
45+
id: find-issue
46+
shell: bash
47+
env:
48+
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
49+
run: |
50+
issue_number=$( \
51+
gh issue list \
52+
--search "in:title ${{ env.WORKFLOW_ISSUE_TITLE }}" \
53+
--state open \
54+
--json number \
55+
| jq --raw-output '.[0].number' \
56+
)
57+
echo "issue-number=${issue_number}" >> $GITHUB_OUTPUT
58+
echo "${issue_number}"
59+
60+
- name: Create or Update Issue
61+
uses: peter-evans/create-issue-from-file@v5
62+
with:
63+
token: "${{ secrets.GITHUB_TOKEN }}"
64+
title: "${{ env.WORKFLOW_ISSUE_TITLE }}"
65+
issue-number: "${{ steps.find-issue.outputs.issue-number || '' }}"
66+
content-filepath: ./pa11y_output.txt

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20.19.4
1+
20.11.1

.pa11yci

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"defaults": {
3+
"chromeLaunchConfig": {
4+
"args": [
5+
"--no-sandbox"
6+
]
7+
},
8+
"runners": [
9+
"axe",
10+
"htmlcs"
11+
]
12+
}
13+
}

0 commit comments

Comments
 (0)