Skip to content

Update monthly investment positions #651

Update monthly investment positions

Update monthly investment positions #651

name: Update monthly investment positions
on:
schedule:
# 6:30 and 12:30 UTC daily
- cron: "30 6,12 * * *"
# Every 5 minutes, only for testing
# - cron: "*/5 * * * *"
jobs:
scheduled-positions-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: main
# Use a PAT instead of a built-in token so that the commit/push triggers the deploy workflow
token: ${{ secrets.TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install
- run: npm run update-positions
- uses: EndBug/add-and-commit@v9
with:
add: _data/positions.json
message: update positions.json