-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (36 loc) · 1002 Bytes
/
scraper.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Scraper Worker
on:
workflow_dispatch:
schedule:
- cron: "*/30 * * * *"
jobs:
scraper:
runs-on: ubuntu-latest
env:
TZ: "Asia/Bangkok"
FACEBOOK_COOKIES: "${{ secrets.FACEBOOK_COOKIES }}"
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