Skip to content

Update data

Update data #534

Workflow file for this run

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