Skip to content

Update Json files #34815

Update Json files

Update Json files #34815

Workflow file for this run

name: Update Json files
on:
workflow_dispatch:
schedule:
# schedule does not support timezone, so use UTC
# https://github.com/actions/runner/issues/1423
# https://github.community/t/timezone-support-for-scheduled-actions/17279
- cron: '0 01-23/2 * * *'
# - cron: '0 * * * *'
jobs:
push_json_and_rssfeed:
name: Update Json files
runs-on: ubuntu-latest
env:
TZ: Asia/Tokyo
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PUSH_ACCESS_TOKEN: ${{ secrets.PUSH_ACCESS_TOKEN }}
GH_READONLY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROJECT_USER_NAME: AndroidDagashi
PROJECT_REPO_NAME: androiddagashi.github.io
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
ref: development
persist-credentials: false
# run corepack before setup mise
# https://github.com/actions/setup-node/issues/899
- run: corepack enable yarn
- name: Setup mise
uses: jdx/mise-action@146a28175021df8ca24f8ee1828cc2a60f980bd5 # v3.5.1
- name: install dependencies
run: |
node --version
corepack enable yarn
yarn install
- name: Setup git config
run: sh ./.github/setup-git-config.sh
- name: Generate json resources
run: yarn api:generate
- name: Generate RSS feed
run: yarn rss:generate
- name: Push generated files if there's any update
run: sh ./.github/push-resources-if-updated.sh
- name: Print debug info
if: failure()
run: |
git remote
git status