-
Notifications
You must be signed in to change notification settings - Fork 12
41 lines (34 loc) · 976 Bytes
/
hugobuild.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
name: Build and Deploy Hugo site to GitHub Pages
on:
push:
branches:
- '*' # or your primary branch
permissions:
contents: write
jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: '16' # or another LTS version
- name: Install dependencies
run: npm install --save-dev postcss postcss-cli autoprefixer
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Build Hugo site
run: hugo --minify
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages-hugo