-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (34 loc) · 1012 Bytes
/
gh-pages.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
41
name: github pages
on:
push:
branches:
- main # Set a branch to deploy
workflow_dispatch:
jobs:
deploy:
if: ${{ contains(github.event.head_commit.message, 'build') || github.event_name == 'workflow_dispatch' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # we need fetch all to get modified (committed) date
# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.9'
- name: Build site
run: bash scripts/build.sh
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build
run: hugo --minify --logLevel debug
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./public