Skip to content

scrape-all

scrape-all #814

Workflow file for this run

name: scrape-all
on:
workflow_dispatch:
schedule:
# run on 18:45 GMT+8 every Mon, Wed, Thurs, Sat, Sun
- cron: '45 10 * * 0,1,3,4,6'
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'v3.1.1'
persist-credentials: false
- name: Use Node 18
uses: actions/setup-node@v4
with:
node-version: '18'
- run: yarn install
- run: yarn build
- name: Scrape data from ALL sources
env:
NODE_ENV: production
SERVER_URL: ${{ secrets.SERVER_URL }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: yarn start
- name: Deploy to Github Pages
if: success()
uses: crazy-max/ghaction-github-pages@v4
with:
target_branch: gh-pages
build_dir: output
commit_message: 'chore: deploy to GitHub Pages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Send Push Notification
if: success()
env:
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
FIREBASE_PRIVATE_KEY_ID: ${{ secrets.FIREBASE_PRIVATE_KEY_ID }}
FIREBASE_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }}
FIREBASE_DATABASE_URL: ${{ secrets.FIREBASE_DATABASE_URL }}
FIREBASE_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
run: yarn firebase