update #827
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: update | |
on: | |
schedule: | |
# 15:00 in UTC is 24:00 in JST | |
- cron: '0 15 * * *' | |
push: | |
branches: main | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Use the latest npm | |
run: npm i -g npm | |
- name: Run npm install | |
run: npm ci | |
- name: Fetch contributors | |
run: npm run fetch | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Diff | |
id: diff | |
run: | | |
git add -N . | |
git diff --name-only --exit-code | |
continue-on-error: true | |
- name: Commit & Push | |
run: | | |
set -x | |
git config user.name github-actions[bot] | |
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | |
git add . | |
git commit -m 'generated' | |
git push | |
if: steps.diff.outcome == 'failure' | |
- name: Dispatch Deploy | |
run: npm run dispatch:deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.AMPLIFY_JUG_WEBSITE_TOKEN }} | |
if: steps.diff.outcome == 'failure' |