Skip to content

Load PurpleAir data #599

Load PurpleAir data

Load PurpleAir data #599

Workflow file for this run

name: Load PurpleAir data
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Setup node.js
uses: actions/setup-node@v4
with:
node-version: "lts/hydrogen"
- name: Install modules
run: npm install
- name: Load PurpleAir data
env:
PURPLEAIR_API_KEY: ${{secrets.PURPLEAIR_API_KEY}}
run: node scripts/load.js
- name: Index data
run: node scripts/index.js
- name: Analyze data
run: node scripts/analyze.js
- name: Commit results
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -Is)
git commit -m "PurpleAir Data: ${timestamp}" || exit 0
git push