Skip to content

Load PurpleAir data #311

Load PurpleAir data

Load PurpleAir data #311

Workflow file for this run

name: Load PurpleAir data
on:
workflow_dispatch:
schedule:
- cron: '*/10 * * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup node.js
uses: actions/setup-node@v3
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/index.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