Update Files #2202
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 Files | |
# Controls when the action will run. Workflow runs when manually triggered using the UI | |
# or API. | |
on: | |
schedule: | |
- cron: "0, 0,12 * * *" | |
workflow_dispatch: | |
# Inputs the workflow accepts. | |
# inputs: | |
# name: | |
# # Friendly description to be shown in the UI instead of 'name' | |
# description: 'Update Time' | |
# # Default value if no value is explicitly provided | |
# default: 'World' | |
# # Input has to be provided for the workflow to run | |
# required: true | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
- uses: actions/[email protected] | |
- name: Install Dependencies | |
run: | | |
pip install pandas | |
npm install prettier | |
- name: Download and convert files | |
run: python content/csvToJson.py | |
- name: Format JSON files | |
run: npx prettier --write content/json | |
- name: Push changes to repo | |
run: | | |
date >> .github/updatetime.log | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "Update data" | |
git push |