-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.09 KB
/
general.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
42
43
44
45
46
47
48
49
50
51
52
53
---
name: general
"on":
push:
branches:
- master
pull_request:
branches:
- master
jobs:
general:
runs-on: ubuntu-latest
steps:
- name: Checkout source
id: source
uses: actions/checkout@v4
- name: Setup nodejs
id: nodejs
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm
- name: Setup hugo
id: hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: latest
extended: true
- name: Install assets
id: assets
run: npm install --ci
- name: Build website
id: build
run: hugo --cleanDestinationDir --enableGitInfo --minify --gc
- name: Deploy website
id: deploy
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
uses: South-Paw/action-netlify-cli@v2
with:
args: deploy --prod --dir public/
...