Skip to content

Deploy feed

Deploy feed #60182

Workflow file for this run

name: Deploy feed
on:
push:
branches:
- main
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
# Stop updating RSS feed and do not request zutomayo.net during maintenance on 2025/02/25
# Ref: https://zutomayo.net/news/maintenance/
check-maintenance:
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
under_maintenance: ${{ steps.check.outputs.under_maintenance }}
steps:
- id: check
run: |
current_time=$(TZ='Asia/Tokyo' date '+%Y-%m-%d')
if [ "${current_time}" == '2025-02-25' ]; then
echo 'under_maintenance=true' >> "${GITHUB_OUTPUT}"
else
echo 'under_maintenance=false' >> "${GITHUB_OUTPUT}"
fi
build:
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
- check-maintenance
if: ${{ needs.check-maintenance.outputs.under_maintenance == 'false' }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version-file: ".node-version"
- run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Generate feed
run: pnpm run generate
- uses: actions/upload-pages-artifact@v3
with:
path: "feed"
- uses: "./.github/actions/failed-notification"
if: ${{ failure() }}
with:
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_ids: ${{ secrets.SLACK_CHANNEL_IDS }}
deploy:
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
- build
permissions:
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/deploy-pages@v4
id: deployment
- uses: "./.github/actions/failed-notification"
if: ${{ failure() }}
with:
slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }}
slack_channel_ids: ${{ secrets.SLACK_CHANNEL_IDS }}