Add HTML Validation

This commit is contained in:
Jonah Aragon 2021-05-01 19:54:23 -05:00
parent 523502f0cb
commit dc111a4359
No known key found for this signature in database
GPG Key ID: 6A957C9A9A9429F7

View File

@ -37,9 +37,10 @@ jobs:
uses: ./.github/actions/build uses: ./.github/actions/build
link: link:
name: "Broken Hyperlink Check" name: "Broken Hyperlinks (Internal)"
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [deps, build] needs: [deps, build]
continue-on-error: true
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -63,3 +64,157 @@ jobs:
uses: untitaker/hyperlink@0.1.15 uses: untitaker/hyperlink@0.1.15
with: with:
args: _site/ --sources src/ args: _site/ --sources src/
extlink:
name: "Broken Hyperlinks (External)"
runs-on: ubuntu-latest
needs: [build, link]
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build website
uses: ./.github/actions/build
- name: Check HTML
uses: chabad360/htmlproofer@v1.1
with:
directory: ${{ github.workspace }}/_site
arguments: --assume-extension --external_only --internal-domains privacyguides.org,www.privacyguides.org
https:
name: "Require HTTPS Internal Links/Images"
runs-on: ubuntu-latest
needs: build
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build website
uses: ./.github/actions/build
- name: Check HTML
uses: chabad360/htmlproofer@v1.1
with:
directory: ${{ github.workspace }}/_site
arguments: --assume-extension --enforce-https --check-img-http --internal-domains privacyguides.org,www.privacyguides.org --disable-external
scripts:
name: "Script Reference Checks"
runs-on: ubuntu-latest
needs: [link, https]
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build website
uses: ./.github/actions/build
- name: Check HTML
uses: chabad360/htmlproofer@v1.1
with:
directory: ${{ github.workspace }}/_site
arguments: --assume-extension --check-html --disable-external --check-sri --report-script-embeds --internal-domains privacyguides.org,www.privacyguides.org
tags:
name: "HTML Tag Test"
runs-on: ubuntu-latest
needs: https
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build website
uses: ./.github/actions/build
- name: Check HTML
uses: chabad360/htmlproofer@v1.1
with:
directory: ${{ github.workspace }}/_site
arguments: --assume-extension --check-html --disable-external --internal-domains privacyguides.org,www.privacyguides.org --report-invalid-tags --report-eof-tags --report-mismatched-tags
entity:
name: "HTML Entity Names Test"
runs-on: ubuntu-latest
needs: https
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build website
uses: ./.github/actions/build
- name: Check HTML
uses: chabad360/htmlproofer@v1.1
with:
directory: ${{ github.workspace }}/_site
arguments: --assume-extension --check-html --disable-external --internal-domains privacyguides.org,www.privacyguides.org --report-missing-names
misc:
name: "Misc HTML Test"
runs-on: ubuntu-latest
needs: https
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build website
uses: ./.github/actions/build
- name: Check HTML
uses: chabad360/htmlproofer@v1.1
with:
directory: ${{ github.workspace }}/_site
arguments: --assume-extension --check-html --disable-external --internal-domains privacyguides.org,www.privacyguides.org --report-missing-doctype
opengraph:
name: "OpenGraph Test"
runs-on: ubuntu-latest
needs: build
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Build website
uses: ./.github/actions/build
- name: Check HTML
uses: chabad360/htmlproofer@v1.1
with:
directory: ${{ github.workspace }}/_site
arguments: --assume-extension --disable-external --check-opengraph