-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (50 loc) · 1.72 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Update data
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
jobs:
update:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/gh-pages'
steps:
- name: Checkout Repo
uses: actions/checkout@master
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Fetch data
run: |
echo "## Fetch data 📥" >> $GITHUB_STEP_SUMMARY
if yarn run gipod; then
echo "✅ Fetched gipod data ⚠️" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Failed to fetch gipod data ⚠️" >> $GITHUB_STEP_SUMMARY
fi
if yarn run overpass; then
echo "✅ Fetched overpass data 🗺️" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Failed to fetch overpass data 🗺️" >> $GITHUB_STEP_SUMMARY
fi
if yarn run data.stad.gent; then
echo "✅ Fetched data.stad.gent data 🏙️" >> $GITHUB_STEP_SUMMARY
else
echo "❌ Failed to fetch data.stad.gent data 🏙️" >> $GITHUB_STEP_SUMMARY
fi
- name: Update changes in GitHub repository
uses: EndBug/add-and-commit@v9
with:
author_name: Haroen Viaene [bot]
author_email: hello@haroen.me
default_author: github_actor
commit: '--allow-empty'
message: 'Update data manually from ${{ github.sha }}'
pull: ' '
push: true