-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 906 Bytes
/
deploy.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
name: Zola on GitHub Pages
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
steps:
- name: Checkout master
uses: actions/checkout@v4
- name: Build only
uses: shalzz/[email protected]
env:
BUILD_DIR: docs
BUILD_ONLY: true
BUILD_FLAGS: --drafts
# A GitHub token is not necessary when BUILD_ONLY is true
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build_and_deploy:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout master
uses: actions/checkout@v4
- name: Build and deploy
uses: shalzz/[email protected]
env:
BUILD_DIR: docs
PAGES_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}