31 lines
1.3 KiB
YAML
31 lines
1.3 KiB
YAML
# Builds the site with the motorino pinned in .motorino-version and checks every page with the
|
|
# Nu HTML Checker, on every push to main and on every pull request, on the shared runner of git.kmalloc.org.
|
|
# The deploy is not here: the hook on the server publishes main.
|
|
name: check
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: docker
|
|
steps:
|
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
|
- name: Install the pinned motorino
|
|
run: |
|
|
version=$(sed -n 1p .motorino-version)
|
|
hash=$(sed -n 2p .motorino-version)
|
|
curl -fsSL -o /usr/local/bin/motorino "https://git.kmalloc.org/squid/motorino/releases/download/v${version}/motorino-linux-amd64"
|
|
echo "${hash} /usr/local/bin/motorino" | sha256sum -c -
|
|
chmod 755 /usr/local/bin/motorino
|
|
- name: Build the site
|
|
run: motorino build -site . -out public
|
|
- name: Install the HTML checker
|
|
run: |
|
|
apt-get update -qq
|
|
apt-get install -y -qq --no-install-recommends default-jre-headless
|
|
npm install --no-save --no-audit --no-fund --prefix /tmp/vnu vnu-jar@26.11.14
|
|
- name: Check the HTML and the CSS
|
|
run: java -jar /tmp/vnu/node_modules/vnu-jar/build/dist/vnu.jar --also-check-css $(find public -name '*.html')
|