Validate Site #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Workflow to validate site files. | |
name: Validate Site | |
on: | |
workflow_dispatch: | |
# Run after a site deploy completed. | |
workflow_run: | |
workflows: [Deploy] | |
types: [completed] | |
branches: [master] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: site | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: npm | |
- name: Restore npm Cache | |
id: cache-npm | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
- name: Install Dependencies | |
if: steps.cache-npm.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Validate HTML | |
run: npm run validate-html |