-
Notifications
You must be signed in to change notification settings - Fork 6
70 lines (59 loc) · 2.07 KB
/
test.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
name: test syntax
on:
# Runs on pull requests targeting the default branch
pull_request:
branches: [main]
# Sets permissions of the GITHUB_TOKEN
permissions:
contents: read
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
syntax-check:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.123.8
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass
run: sudo snap install dart-sass
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: testing
HUGO_ENV: testing
run: |
hugo --gc --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
hugo -s subsite/docs --baseURL "${{ steps.pages.outputs.base_url }}/docs/"
mv subsite/docs/public public/docs
npx -y pagefind --site public
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@c053181aa0c3d17606addfe97a9075a32723548a # for v1.9.3
with:
args: --no-progress -u "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -E './content/**/*.md'
jobSummary: true
# - name: Create Issue From File
#if: env.lychee_exit_code != 0
#uses: peter-evans/create-issue-from-file@v5
#permissions:
#issues: write
#with:
#title: Link Checker Report
#content-filepath: ./lychee/out.md
#labels: report, automated issue