Skip to content

Scrape financial disclosure data #263

Scrape financial disclosure data

Scrape financial disclosure data #263

Workflow file for this run

name: Scrape financial disclosure data
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Pull data from API and save to CSV files
run: deno run --allow-write --allow-net --allow-env ./scripts/index.ts
env:
API_TOKEN: ${{ secrets.API_TOKEN }}
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git pull
git add *.csv
timestamp=$(date -u)
git commit -m "Latest data: ${timestamp}" || exit 0
git push