2022-03-05 21:47:11 +00:00
|
|
|
name: Update theme
|
|
|
|
|
|
|
|
# Controls when the workflow will run
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# Update theme automatically everyday at 00:00 UTC
|
|
|
|
- cron: "0 0 * * *"
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2023-07-12 10:35:18 +00:00
|
|
|
update-theme:
|
2022-03-05 21:47:11 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2023-07-12 10:35:18 +00:00
|
|
|
permissions:
|
|
|
|
# Give the default GITHUB_TOKEN write permission to commit and push the
|
|
|
|
# added or changed files to the repository.
|
|
|
|
contents: write
|
|
|
|
|
2022-03-05 21:47:11 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
2023-07-12 10:33:46 +00:00
|
|
|
hugo-version: 0.115.2
|
2022-03-05 21:47:11 +00:00
|
|
|
extended: true
|
|
|
|
|
|
|
|
- name: Update theme
|
|
|
|
run: hugo mod get -u github.com/CaiJimmy/hugo-theme-stack/v3
|
|
|
|
|
2022-03-05 21:50:20 +00:00
|
|
|
- name: Tidy go.mod, go.sum
|
|
|
|
run: hugo mod tidy
|
|
|
|
|
2022-03-05 21:47:11 +00:00
|
|
|
- name: Commit changes
|
|
|
|
uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: "CI: Update theme"
|