Daily History Today Build #266
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: Daily History Today Build | |
| on: | |
| schedule: | |
| - cron: "0 0,1,2 * * *" # 每天 00/01/02 点 UTC 触发,多次保障 | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-commit: | |
| runs-on: ubuntu-latest | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.134.1' | |
| extended: true | |
| - name: Build site (sanity check) | |
| run: hugo --config hugo.toml | |
| - name: Commit daily rebuild trigger | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git commit --allow-empty -m "chore: daily history-today rebuild trigger" | |
| git push |