generated from sigstore/sigstore-project-template
-
Notifications
You must be signed in to change notification settings - Fork 15
46 lines (36 loc) · 989 Bytes
/
ci-build.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
name: Build CI Hugo
on:
pull_request:
branches: ["main"]
permissions: {}
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.108.0'
# extended: true
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: hugo --minify
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./public
retention-days: '5'