Skip to content

Update Json files #34194

Update Json files

Update Json files #34194

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@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.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@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
- 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