-
Notifications
You must be signed in to change notification settings - Fork 78
32 lines (25 loc) · 1.18 KB
/
pr-tests.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
name: Pull Request tests
on:
pull_request:
types: [opened, synchronize]
jobs:
pull-request-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Install assets
run: nix develop --command bash -c "cd themes/hugo-darktable-docs-theme/assets/ && yarn install"
- name: Check for broken links
run: nix develop --command bash -c "hugo server --disableFastRender -verbose --config config.yaml -b http://localhost:1313/dtdocs/ & sleep 30 && lychee --exclude \.*pdf$ --exclude \.*epub$ --exclude \.*#$ --no-progress http://localhost:1313/dtdocs/index.html && pkill hugo"
- name: Generate translated files
run: nix develop --command bash -c "cd tools && bash generate-translations.sh --no-update"
- name: Clear
run: nix develop --command bash -c "rm -rf public"
- name: Build
run: nix develop --command bash -c "hugo"