Theme Update #290
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Theme Update" | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
update-theme: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4.1.7 | |
with: | |
ref: main | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v3.0.0 | |
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@v7 | |
with: | |
base: main | |
title: Update theme | |
labels: automerge |