Skip to content

Commit

Permalink
update theme action
Browse files Browse the repository at this point in the history
  • Loading branch information
tcarreira committed Jun 2, 2024
1 parent dd3b254 commit 7f0ce67
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/theme-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: "Theme Update"

on:
schedule:
- cron: "0 0 * * 6" # weekly

jobs:
update-theme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
with:
ref: main

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18

- 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@v6
with:
base: main
title: Update theme

0 comments on commit 7f0ce67

Please sign in to comment.