-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 985 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
37
38
39
40
#
# Build and deploy the website
#
name: Deploy
# Run on main branch only
on:
# pull_request: # enable pull_request for testing
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- name: Checkout
uses: actions/checkout@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 0.84.3
extended: true
- name: Build the website
run: make build
- name: Deploy the website
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
# Only keep the latest commit to avoid bloating the repository
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'