-
Notifications
You must be signed in to change notification settings - Fork 616
52 lines (42 loc) · 1.07 KB
/
theme-update.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
name: "Theme Update"
on:
schedule:
- cron: "0 0 * * *"
jobs:
update-theme:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
ref: main
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Setup Hugo
uses: peaceiris/[email protected]
with:
hugo-version: "latest"
extended: true
- name: Update hugo modules
run: |
# update to latest version of all modules
hugo mod get -u
# update the npm dependencies
hugo mod npm pack
# cleanup go.sum file
hugo mod tidy
- name: Install node modules
run: npm install
- name: Build
run: |
# build the site
hugo --minify
# remove file generated by the build
rm -rf public/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
base: main
title: Update theme
labels: automerge