-
Notifications
You must be signed in to change notification settings - Fork 112
50 lines (42 loc) · 1.15 KB
/
update-data.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
40
41
42
43
44
45
46
47
48
49
50
name: Update Data
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: "master"
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Set up Node.js 12
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install python dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Update Data
run: |
python ./etl/2025.py
git config user.name "opendataday[bot]"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Update at ${timestamp}" || exit 0
git push
- name: Install JS dependencies
run: npm install
- name: Build
run: |
npm run build
lektor build
- name: Deploy
run: lektor deploy ci --username ${{ github.actor }} --password ${{ secrets.GITHUB_TOKEN }}