Generate feeds and site #15458
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: Generate feeds and site | |
on: | |
push: | |
branches: [ main ] | |
schedule: | |
# NOTE: UTCなので9時間引く | |
# 平日 8~24時の1時間おき | |
# TODO: 9時(UTC0時)が実行されないことがあるので解決したい。恐らく0時登録が多いため実行されづらい | |
- cron: 0 23,0-15 * * 1-5 | |
# 休日 8~24時の2時間おき | |
- cron: 0 23,1,3,5,7,9,11,13,15 * * 0,6 | |
workflow_dispatch: | |
jobs: | |
generate-feed: | |
name: Generate Feed | |
runs-on: ubuntu-24.04 | |
timeout-minutes: 30 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: main | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .tool-versions | |
cache: npm | |
- run: npm ci | |
- uses: ./.github/actions/restore-feed-cache | |
- run: npm run feed-generate | |
- run: npm run site-prepare | |
- run: npm run site-build | |
- uses: ./.github/actions/save-feed-cache | |
- uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
# NOTE: 変更履歴が必要な場合は false に変更 | |
force_orphan: true | |
user_name: 'github-actions[bot]' | |
user_email: 'github-actions[bot]@users.noreply.github.com' |