-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 1.2 KB
/
sync-transmission.yml
File metadata and controls
33 lines (31 loc) · 1.2 KB
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
name: Sync Transmission Lines
on:
schedule:
- cron: '0 6 1 * *' # 1st of each month at 6am UTC (HIFLD updates irregularly)
workflow_dispatch: {} # Manual trigger
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Sync transmission lines from HIFLD
run: npx tsx scripts/sync-transmission-lines.ts
- name: Install tippecanoe
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq libsqlite3-dev zlib1g-dev
git clone --depth 1 https://github.com/felt/tippecanoe.git /tmp/tippecanoe
cd /tmp/tippecanoe && make -j$(nproc) && sudo make install
- name: Rebuild tiles
run: bash scripts/build-tiles.sh
- name: Commit & push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add data/transmission-lines.json public/tiles/transmission-lines.pmtiles
git diff --staged --quiet || (git commit -m "data: update transmission lines (HIFLD)" && git push)