Skip to content

Scrape

Scrape #790

Workflow file for this run

name: Scrape
on:
schedule:
- cron: "0 9,18 * * *"
workflow_dispatch:
jobs:
scrape:
name: Scrape NASA Image of the Day website
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: npm
- run: npm ci
- name: Run scraper scripts
run: node ./lib/scraper.js
continue-on-error: true
- name: Commit and push changed files
run: |
git diff
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git commit -m "馃 Automated update (`date +%FT%T%z`)" || exit 0
git push