-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.21 KB
/
update.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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