forked from jackyzha0/quartz
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.32 KB
/
pr.yaml
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
name: Deploy PR preview
on:
pull_request:
branches: [ hugo ]
jobs:
deploy:
runs-on: ubuntu-22.04
env:
NETLIFY_SITENAME: scalingsynthesis.netlify.app
NETLIFY_ALIAS: pr-${{github.event.pull_request.number}}-${{github.sha}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Build Link Index
uses: jackyzha0/[email protected]
with:
index: true
input: content
output: assets/indices
root: .
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.96.0'
extended: true
- name: Build
run: hugo --minify --baseURL="https://${{env.NETLIFY_ALIAS}}--${{env.NETLIFY_SITENAME}}/"
- name: Netlify deploy
uses: netlify/actions/cli@master
id: netlify-deploy
with:
args: deploy --dir=public --alias=${{env.NETLIFY_ALIAS}}
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
- name: Link checker
uses: JustinBeckwith/linkinator-action@v1
with:
paths: ${{steps.netlify-deploy.outputs.NETLIFY_URL}}
recurse: true
verbosity: "INFO"