Skip to content

fetch-data

fetch-data #174

Workflow file for this run

name: fetch-data
on:
workflow_dispatch:
push:
branches:
- main
schedule:
# run on 17:00 every Friday
- cron: '0 17 * * Fri'
jobs:
get-data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: yarn install
- name: Build /dist
run: yarn build
- name: Fetch data
env:
NODE_ENV: production
run: yarn start
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
if: success()
with:
target_branch: gh-pages
build_dir: temp
commit_message: 'chore: deploy to GitHub Pages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}