-
Notifications
You must be signed in to change notification settings - Fork 165
66 lines (58 loc) · 1.95 KB
/
build-and-validate-on-push.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# Copyright (c) 2020 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# GitHub Actions configuration file for htmltest
# See: https://github.com/wjdp/htmltest
name: Build and validate
on:
push:
branches:
- main
jobs:
build:
name: Build and validate
runs-on: ubuntu-22.04
container: "quay.io/eclipse/che-docs:next"
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
# Cache for Antora UI and Htmltest.
# See: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
# Htmltest accepts 2 weeks old cache for the status code of checked external URLs
# See: https://github.com/wjdp/htmltest
# Refresh the cache every week to avoid a stale cache for htmltest
# See: https://github.com/actions/cache
# See: http://man7.org/linux/man-pages/man1/date.1.html
- name: Get Date
id: get-date
run: echo "YEAR_WEEK=$(/bin/date -u +%Y%U)" >> $GITHUB_OUTPUT
shell: bash
- name: Restore cache
uses: actions/cache@v3
env:
cache-name: cache
with:
path: .cache
key: ${{ steps.get-date.outputs.YEAR_WEEK }}
- name: Build using antora
id: antora-build
run: CI=true antora generate antora-playbook-for-development.yml --stacktrace --log-failure-level=warn
- name: Upload artifact doc-content
uses: actions/upload-artifact@v3
with:
name: doc-content
path: build/site
- name: Validate links using htmltest
id: validate-links
run: htmltest
- name: Report unused content
run: tools/detect-unused-content.sh
- name: Count Vale alerts
run: tools/count_vale_errors.sh