-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (30 loc) · 1.13 KB
/
sync-annual.yml
File metadata and controls
32 lines (30 loc) · 1.13 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
name: Sync Annual Data
on:
schedule:
- cron: '0 12 1 10 *' # Oct 1 at noon UTC (after EIA-860 typically releases in Sept)
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
- run: npx tsx scripts/sync-power-plants.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/power-plants.json public/tiles/*.pmtiles
git diff --staged --quiet || (git commit -m "data: update power plants (EIA-860 annual)" && git push)