forked from foldaway/sg-scraper
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (38 loc) · 944 Bytes
/
run.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: 'Run scraper'
on:
push:
branches:
- master
schedule:
- cron: '0 0 * * 6'
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12.x
- run: yarn install
- run: yarn build
- run: yarn scrape
env:
NODE_ENV: production
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: output
commit_message: 'chore: deploy to GitHub Pages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload traces
if: failure()
uses: actions/upload-artifact@v2
with:
name: traces
path: traces/*.json