Scrape #281
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: Scrape | |
on: | |
schedule: | |
- cron: "0 9,18 * * *" | |
workflow_dispatch: | |
jobs: | |
scrape: | |
name: Scrape NASA Search API | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".nvmrc" | |
cache: npm | |
- run: npm ci | |
- name: Run scraper scripts | |
run: node ./lib/scraper.js | |
- name: Commit and push changed files | |
run: | | |
git diff | |
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
git config --global user.name 'github-actions[bot]' | |
git add -A | |
git commit -m "🤖 Automated update (`date +%FT%T%z`)" || exit 0 | |
git push |