This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
generated from wildtechgarden/module-starter-hugo-wtg
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (69 loc) · 2.38 KB
/
test-build-audit.yml
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
67
68
69
---
# yamllint disable rule:key-ordering
name: test-build-audit
on: # yamllint disable-line
pull_request:
branches:
- main
types:
- assigned
- opened
- synchronize
- reopened
jobs:
# yamllint disable rule:line-length
audit-only:
runs-on: ubuntu-22.04
strategy:
matrix:
hugo-version: [0.112.7, 0.115.4, 0.117.0, latest]
post-status: [default, drafts, future]
steps:
- uses: actions/checkout@v4
- name: Run audit-build-action-hugo using config from tests/config
uses: ./
with:
base-url: "https://example.com/"
config-file: hugo.toml,variations/config-${{ matrix.post-status }}.toml,variations/config-${{ matrix.hugo-version }}.toml
hugo-version: ${{ matrix.hugo-version }}
include-drafts-audit: ${{ toJSON(matrix.post-status == 'drafts') }}
include-future-audit: ${{ toJSON(matrix.post-status == 'future') }}
source-directory: tests/config
- name: Validate HTML in output-directory
uses: wildtechgarden/validator-html-action@main
with:
output-directory: public-${{ matrix.post-status }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
use-existing-workspace: "true"
upload-artifact:
runs-on: ubuntu-22.04
strategy:
matrix:
post-status: [default, drafts, future]
steps:
- uses: actions/checkout@v3
- name: Run hugo-action-build-audit from src dir to public
uses: ./
with:
config-file: hugo.toml,variations/config-${{ matrix.post-status }}.toml,variations/config-latest.toml
include-drafts-bundle: ${{ toJSON(matrix.post-status == 'drafts') }}
include-future-bundle: ${{ toJSON(matrix.post-status == 'future') }}
output-directory: public-${{ matrix.post-status }}
source-directory: tests/config
upload-site-as: unminified-site-${{ matrix.post-status }}
validate-html-artifact:
needs: upload-artifact
runs-on: ubuntu-22.04
strategy:
matrix:
post-status: [default, drafts, future]
steps:
- name: Validate HTML from artifact
uses: wildtechgarden/validator-html-action@main
with:
download-site-as: unminified-site-${{ matrix.post-status }}
output-directory: public-${{ matrix.post-status }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
# yamllint enable rule:line-length
# yamllint enable rule:key-ordering
...