Update theme #1068
This file contains hidden or 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: 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: | |
| Update-FixIt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| # use the environment variable HUGO_VERSION as the hugo version, if not set, use `latest`. | |
| hugo-version: ${{ vars.HUGO_VERSION || 'latest' }} | |
| extended: true | |
| - name: Update theme components | |
| run: | | |
| hugo mod get -u | |
| # update FixIt theme to latest stable version | |
| # hugo mod get -u github.com/hugo-fixit/FixIt@latest | |
| # update FixIt theme to main branch (bleeding edge) | |
| # hugo mod get -u github.com/hugo-fixit/FixIt@main | |
| hugo mod tidy | |
| - uses: actions/setup-node@v6 | |
| - name: Fetch and split theme configuration | |
| run: | | |
| npx fixit-cli split https://raw.githubusercontent.com/hugo-fixit/FixIt/refs/heads/main/hugo.toml | |
| rm -f config/_default/mediaTypes.toml | |
| rm -f config/_default/outputFormats.toml | |
| - name: Commit changes | |
| uses: stefanzweifel/git-auto-commit-action@v7 | |
| with: | |
| commit_message: 'chore(deps): update theme and components version' | |
| commit_author: 'github-actions[bot] <github-actions[bot]@users.noreply.github.com>' |