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:
| 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).
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"TBD
Copyright © 2023 Wild Tech 'Garden'
Released under an MIT License