-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (66 loc) · 1.98 KB
/
Copy pathlinks.yml
File metadata and controls
80 lines (66 loc) · 1.98 KB
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
70
71
72
73
74
75
76
77
78
79
80
name: links
on:
push:
branches:
- main
- staging
pull_request:
jobs:
link_checker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup prerequisites
run: |
sudo apt-get install -y xsltproc
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
cache-version: 0 # Increment this number if you need to re-download cached gems
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- run: npm install
- name: Update submodules
run: |
make update-init update-modules
- uses: actions/cache@v4
id: cache-schema-docs
name: Cache schema documentation
with:
path: |
schemas/
key: ${{ runner.os }}-${{ hashFiles('schemas/**') }}
- name: Generate schema documentation
if: steps.cache-schema-docs.outputs.cache-hit != 'true'
run: make schemas/_site
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: build_source/.done build_source/_data/schemas.yml bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Link Checker
uses: lycheeverse/lychee-action@v2
with:
args: --verbose --no-progress --base '_site' --cache --max-cache-age 1d --root-dir / '_site/**/*.html'
fail: true
# - name: Create Issue From File
# uses: peter-evans/create-issue-from-file@v2
# with:
# title: Link Checker Report
# content-filepath: ./lychee/out.md
# labels: report, automated issue