Scrape #2282
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
# This is a basic workflow to help you get started with Actions | |
name: Scrape | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
# https://crontab.guru/#15_4/12_*_*_* | |
# At minute 15 past every 12th hour from 4 through 23. | |
on: | |
schedule: | |
- cron: "16 4/4 * * *" | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "yarn" | |
- name: Install dependencies | |
run: yarn install | |
- name: Run a multi-line script | |
run: | | |
node functions/scraper/scraper-cli.js | |
git config --global user.email "githb-actions[bot]@users.noreply.github.com" | |
git config --local user.name "GitHub Actions [bot]" | |
git add . | |
git commit -m "[bot] Scrape" || true | |
- name: Push changes # push the output folder to your repo | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} |