GitHub action using W3C's validator to validate the HTML and CSS of a website
https://www.validator-html-action.wtg-demos.ca/
- Shell 92.1%
- PowerShell 7.9%
|
|
||
|---|---|---|
| .github/workflows | ||
| content | ||
| scripts | ||
| tests | ||
| .editorconfig | ||
| .gitignore | ||
| .markdownlint.json | ||
| .pre-commit-config.yaml | ||
| .stylelintrc.json | ||
| .yamllint.yaml | ||
| action.yml | ||
| cspell.json | ||
| go.mod | ||
| go.sum | ||
| hugo.toml | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.fr.md | ||
| README.md | ||
| validator-html-action.code-workspace | ||
| words-fr-project.txt | ||
| words-project.txt | ||
GitHub action to validate HTML and CSS of site
Description: GitHub action using W3C's validator to validate the HTML and CSS of
a website
Repository URL: https://github.com/wildtechgarden/validator-html-action
Site: https://www.validator-html-action.wtg-demos.ca
CI Status:
Contents
Configuration and usage
Actions inputs variables
| Input | Required | Default | Meaning |
|---|---|---|---|
| download-site-as | yes | unminified-site | GitHub Artifact containing a tarball with the site |
| download-site-filename | yes | hugo-site.tar | Name of tarball containing the site |
| output-directory | yes | public | subdirectory (in tarball) containing the site to validate |
| repo-token | yes | (none) | GITHUB_TOKEN |
| use-existing-workspace | no | false | Use an existing checkout and built site instead of artifact |
The tarball (default hugo-site.tar) in the artifact (default
unminified-site) pointed at by download-site-as must contain the
following:
- A subdirectory tree containing the site (default: public, optionally
defined by
output-directory).
Sample usage
name: test-html-validate
on:
pull_request:
types:
- assigned
- opened
- synchronize
- reopened
push:
branches:
- main
jobs:
build-unminified-site:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: "Build site with Hugo and audit"
uses: wildtechgarden/audit-build-action-hugo-dfd@main
with:
base-url: "https://www.example.com/"
build-for-downstream: "true"
source-directory: exampleSite
use-lfs: false
- name: "Validate HTML of statically generated website"
uses: wildtechgarden/validator-html-action@main
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
use-existing-workspace: "true"
Development
TBD
Colophon
Copyright © 2023 Wild Tech 'Garden'
Released under an MIT License