Run index and save results #219
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: Run index and save results | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '*/30 * * * *' | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
run-fetchdata: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Install dependencies | |
run: npm install | |
- name: Run index script | |
run: node index.js | |
timeout-minutes: 1 | |
- name: Commit readme files | |
if: always() | |
id: commit | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Action" | |
if ! git diff --exit-code; then | |
git add . | |
git commit -m "Update feeds" | |
git push | |
fi | |
shell: bash |