Skip to content

Commit

Permalink
One job on push. Count vale errors. (#1930)
Browse files Browse the repository at this point in the history
  • Loading branch information
themr0c authored Mar 26, 2021
1 parent 443347a commit 2e2e309
Showing 1 changed file with 38 additions and 36 deletions.
74 changes: 38 additions & 36 deletions .github/workflows/build-and-validate-on-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,19 @@
# GitHub Actions configuration file for htmltest
# See: https://github.com/wjdp/htmltest

name: Build and validate documentation on push
name: Build and validate
on:
- push
jobs:
build:
name: Build the documentation
name: Build and validate
runs-on: ubuntu-20.04
container: "quay.io/eclipse/che-docs:latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Build using antora
id: antora-build
Expand All @@ -32,14 +34,14 @@ jobs:
name: doc-content
path: build/site

htmltest:
name: link checker # This name is set as mandatory in the GitHub configuration.
runs-on: ubuntu-20.04
container: "quay.io/eclipse/che-docs:latest"
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
# htmltest:
# name: link checker # This name is set as mandatory in the GitHub configuration.
# runs-on: ubuntu-20.04
# container: "quay.io/eclipse/che-docs:latest"
# needs: build
# steps:
# - name: Checkout code
# uses: actions/checkout@v2

- name: Cache htmltest status code of checked external URLs # See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
uses: actions/cache@v2
Expand All @@ -49,35 +51,35 @@ jobs:
key: refcache.json
path: .cache/htmltest

- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: doc-content
# - name: Download artifacts
# uses: actions/download-artifact@v2
# with:
# name: doc-content

- name: Check internal and external links using htmltest
- name: Validate links using htmltest
id: validate-links
run: htmltest

vale-all-content:
name: Validate style on all content on push
runs-on: ubuntu-20.04
container: "quay.io/eclipse/che-docs:latest"
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Vale
run: |
vale -v
vale .
unusedimages:
name: Report unused images
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
# unusedimages:
# name: Report unused images
# runs-on: ubuntu-20.04
# steps:
# - name: Checkout code
# uses: actions/checkout@v2

- name: Detect Unused Images
- name: Report Unused Images
run: tools/detect-unused-images.sh

# vale-all-content:
# name: Validate style on all content on push
# runs-on: ubuntu-20.04
# container: "quay.io/eclipse/che-docs:latest"
# steps:
# - name: Checkout code
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
- name: Count Vale errors
run: |
vale -v
vale --minAlertLevel=error --output=line . | wc -l

0 comments on commit 2e2e309

Please sign in to comment.