Update APY Data #473
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update APY Data | |
on: | |
schedule: | |
- cron: '0 * * * *' # This runs every hour at the start of the hour | |
workflow_dispatch: # Allows manual trigger | |
jobs: | |
update-apy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install dependencies | |
run: npm install axios | |
- name: Fetch and update APY data | |
run: | | |
node update-apy.js | |
- name: Commit changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
git add apy-data.json | |
git commit -m "Update APY data" | |
git push |