update tradeable items #142
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 tradeable items | |
on: | |
schedule: | |
- cron: '0 0 * * 5' | |
workflow_dispatch: | |
jobs: | |
update_tradeable_items: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install dependencies | |
run: npm install | |
- name: Run update script | |
run: npm run scrapeExchangeItems | |
- name: Commit and push changes | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add data/tradeable_items.json | |
git diff --staged --quiet || git commit -m "updated" | |
git push |