Scraper Worker #45
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: 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/[email protected] | |
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 "[email protected]" | |
git config --global user.name "sctnightcore" | |
git add . | |
git commit -m "Refresh Scraper Data" || exit 0 | |
git push |