scrape-daily.yaml #43
This file contains hidden or 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-daily.yaml | |
| on: | |
| schedule: | |
| # Runs daily at 00:00 UTC | |
| - cron: '0 2 * * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| render: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout this repo | |
| - uses: actions/checkout@v5 | |
| with: | |
| ref: 'master' | |
| # Install R | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| use-public-rspm: true | |
| # Install R packages from files/DESCRIPTION | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: | | |
| github::eringrand/astropic | |
| # Execute the script | |
| - name: Run a script with a secret | |
| run: Rscript data-raw/scrape.R | |
| env: | |
| NASA_KEY: ${{ secrets.NASA_KEY }} | |
| # Commit the changes back to this repo | |
| - uses: stefanzweifel/git-auto-commit-action@v5 | |
| with: | |
| branch: 'master' |