Skip to content

data

data #728

Workflow file for this run

name: data
on:
schedule:
- cron: 0 0 */2 * *
workflow_dispatch: {}
push:
paths:
- .github/workflows/flat.yml
- ./postprocessing/parse-covid-stats-data.js
- ./postprocessing/parse-mobility-data.js
- ./queries/query.sql
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Setup deno
uses: denoland/setup-deno@main
with:
deno-version: v1.10.x
- name: Check out repo
uses: actions/checkout@v2
- name: Fetch data
uses: githubocto/flat@v3
with:
http_url: https://raw.githubusercontent.com/OxCGRT/USA-covid-policy/master/data/OxCGRT_US_subnational_05Aug2020.csv
downloaded_filename: ./raw-data/restrictions_per_state.csv
- name: Fetch data
uses: githubocto/flat@v2
with:
http_url: https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-states.csv
downloaded_filename: ./raw-data/covid_stats.csv
postprocess: ./postprocessing/parse-covid-stats-data.js
- name: Fetch data
uses: githubocto/flat@v2
with:
sql_connstring: ${{ secrets.DB_CONNECTION_STRING }}
sql_queryfile: ./queries/query.sql
downloaded_filename: ./raw-data/mobility.csv
postprocess: ./postprocessing/parse-mobility-data.js
postprocess:
runs-on: ubuntu-latest
needs: scheduled
steps:
- name: Setup deno
uses: denoland/setup-deno@main
with:
deno-version: v1.x
- name: Checkout code
uses: actions/checkout@master
- name: Process files
run: deno run -A --unstable ./postprocessing/postprocess.js
- name: Commit & Push changes
uses: actions-js/push@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
force: true
- name: Build dashboard with updated data
working-directory: ./dashboard
run: yarn && yarn deploy-action
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dashboard/out