Fetch alternative text data #392
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: Fetch alternative text data | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 2 * * *" | |
jobs: | |
fetch: | |
name: Fetch alternative text data | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: main | |
- name: Set up JavaScript | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20.x | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Fetch data | |
run: node alt.js | |
- name: Push data to GitHub | |
run: | | |
git add ./data.csv | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
timestamp=$(date -u) | |
git commit -m "Fetch data at ${timestamp}" || exit 0 | |
git push |