Generate RSS Feeds #46
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
| # .github/workflows/generate.yml | |
| name: Generate RSS Feeds | |
| on: | |
| push: | |
| branches: | |
| - master | |
| schedule: | |
| - cron: '0 9 * * *' # 毎日 18:00 JST (09:00 UTC) | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Nix | |
| uses: cachix/install-nix-action@v31 | |
| with: | |
| extra_nix_config: | | |
| experimental-features = nix-command flakes | |
| - name: Cache Nix store | |
| uses: nix-community/cache-nix-action@v7 | |
| with: | |
| primary-key: nix-${{ hashFiles('flake.lock', 'gemset.nix') }} | |
| restore-prefixes-first-match: nix- | |
| gc-max-store-size-linux: 4G | |
| - name: Build devShell dependencies | |
| run: nix build .#devShells.x86_64-linux.default.inputDerivation --no-link | |
| - name: Cache node_modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: node-${{ hashFiles('package-lock.json') }} | |
| - name: Generate feeds | |
| run: nix develop -c xvfb-run ruby bin/generate | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'output' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |