forked from apache/dubbo-website
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (53 loc) · 1.73 KB
/
link_check.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
name: Link Check
on:
schedule:
- cron: '0 * * * *'
push:
pull_request:
workflow_dispatch:
jobs:
link_check_job:
runs-on: ubuntu-latest
name: Link Check Job
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '16'
- name: Setup Docsy
run: git submodule update --init --recursive && sudo npm install -D --save autoprefixer && sudo npm install -D --save postcss-cli
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
env:
HUGO_ENV: production
run: hugo mod clean && hugo --minify --baseURL /
- name: Cache Html Test Ref
uses: ./.github/actions/always-upload-cache
with:
path: tmp/.htmltest/refcache.json
key: ${{ runner.os }}-htmltest-ref-${{ github.run_number }}-${{ github.run_id }}-
restore-keys: |
${{ runner.os }}-htmltest-ref-
- name: Lint Self
run: docker run -v $(pwd):/test --rm wjdp/htmltest -s -c /test/.htmltest.yml
- name: Lint External
run: docker run -v $(pwd):/test --rm wjdp/htmltest -c /test/.htmltest.yml
- name: Print lint failed list if failure
if: failure()
run: cat tmp/.htmltest/htmltest.log | grep -v "hitting ---"
- name: Pack lint result if failure
if: failure()
run: 7z a ${{ github.workspace }}/htmltest.zip tmp/.htmltest/* -r
- name: Upload lint result failure
if: failure()
uses: actions/upload-artifact@v2
with:
name: "htmltest.zip"
path: htmltest.zip