Skip to content

Collect status JSON #721

Collect status JSON

Collect status JSON #721

Workflow file for this run

name: Collect status JSON
on:
schedule:
# Merge happens twice a day, and either of them runs the js(esm) job.
# Run this twice a day as well, to catch both of them.
- cron: '0 0,12 * * *'
push:
branch: gh-pages
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: "3.7"
- name: Setup Git Profile
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Collect status JSON
run: python3 collect_status.py
- name: Add files
run: |
git add .
set +e
git diff --cached --quiet
echo "##[set-output name=modified;]$?"
set -e
id: status_add
- name: Commit files
if: steps.status_add.outputs.modified == '1'
run: |
git commit -m "Update status JSON" -a
- name: Push changes
if: steps.status_add.outputs.modified == '1'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages