Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

wildtechgarden/validator-html-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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: pre-commit.ci status build-audit

Contents

  1. Contents
  2. Configuration and usage
    1. Actions inputs variables
    2. Sample usage
  3. Development
  4. Colophon

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