-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (39 loc) · 1.12 KB
/
build.yml
File metadata and controls
43 lines (39 loc) · 1.12 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
name: Build site
on:
push:
branches: [ "main" ]
pull_request:
types:
- opened
- reopened
- synchronize
- closed
concurrency: preview-${{ github.ref }}
env:
CARGO_TERM_COLOR: always
jobs:
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Build and deploy
uses: shalzz/zola-deploy-action@74526e63f38f84b82476349bbcd886b82040ff98 # v0.22.1
env:
PAGES_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
preview:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install and build
if: github.event.action != 'closed'
uses: shalzz/zola-deploy-action@74526e63f38f84b82476349bbcd886b82040ff98 # v0.22.1
env:
BUILD_ONLY: true
BUILD_FLAGS: --drafts
BUILD_THEMES: false
CHECK_LINKS: true