-
Notifications
You must be signed in to change notification settings - Fork 1
80 lines (64 loc) Β· 1.88 KB
/
gh-pages.yml
File metadata and controls
80 lines (64 loc) Β· 1.88 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: Page Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check-typo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Typo check
uses: crate-ci/typos@v1.45.1
build:
needs: check-typo
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup Build Environment
uses: jdx/mise-action@v4
- name: Build
run: hugo
- name: Upload Build Artifact
uses: actions/upload-artifact@v7
with:
name: ${{ vars.ARTIFACT_NAME }}
path: ${{ vars.ARTIFACT_PATH }}
check-broken-links:
needs: build
runs-on: ubuntu-latest
steps:
# Checkout the repository to access the lychee config file
- uses: actions/checkout@v6
- name: Download Build Artifact
uses: actions/download-artifact@v8
with:
name: ${{ vars.ARTIFACT_NAME }}
path: ${{ vars.ARTIFACT_PATH }}
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
fail: true
lycheeVersion: v0.21.0
args: "${{ vars.ARTIFACT_PATH }} --config .lychee/config.toml --exclude-file .lychee/exclude-temporary.txt --exclude-file .lychee/exclude-permanent.txt"
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v8
with:
name: ${{ vars.ARTIFACT_NAME }}
path: ${{ vars.ARTIFACT_PATH }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ${{ vars.ARTIFACT_PATH }}
publish_branch: gh-pages # deploying branch
cname: ${{ vars.CNAME }}