Skip to content

Scraper Worker

Scraper Worker #33

Workflow file for this run

name: Scraper Worker
on:
workflow_dispatch:
schedule:
- cron: "*/30 * * * *"
jobs:
scraper:
runs-on: ubuntu-latest
env:
TZ: "Asia/Bangkok"
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Set Timezone
uses: szenius/set-timezone@v1.2
with:
timezoneLinux: "Asia/Bangkok"
- name: "Use Node.js ${{ matrix.node-version }}"
uses: actions/setup-node@v1
with:
node-version: "${{ matrix.node-version }}"
- run: npm ci
- run: npm run build
- run: npm run start
- name: Commit and push if data changed
run: |-
git diff
git config --global user.email "sctnightcore@users.noreply.github.com"
git config --global user.name "sctnightcore"
git add .
git commit -m "Refresh Scraper Data" || exit 0
git push