-
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (34 loc) · 1022 Bytes
/
update.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
---
name: Update data and Publish Site
# Controls when the action will run.
on:
# Triggers the workflow every 2 hours
schedule:
- cron: "0 */2 * * *"
# Triggers on pushes to main branch
push:
branches:
- main
# Add run this workflow button to GH
workflow_dispatch:
# A workflow run is made up of one or more jobs (sequential or parallel)
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks executed as part of the job
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: BSFishy/pip-action@v1
with:
requirements: requirements.txt
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- run: scripts/update-data.sh push
- run: rm -f .no-update-site
if: github.event.schedule != '0 */2 * * *'
- run: scripts/deploy-site.sh