Add relay location maps and automation workflow

This commit is contained in:
lollerfirst
2025-11-01 19:52:43 +01:00
parent d4c0efc12b
commit bd4a666b99
5 changed files with 11263 additions and 0 deletions
+57
View File
@@ -0,0 +1,57 @@
name: Update Relay Maps
on:
# Run after the "Update Relay Data" workflow completes
workflow_run:
workflows: ["Update Relay Data"]
types:
- completed
# Also allow manual triggering
workflow_dispatch:
permissions:
contents: write
jobs:
update-relay-maps:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 100 # Need deeper history
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install matplotlib pandas numpy folium scipy
- name: Generate relay maps
run: |
mkdir -p assets
# Execute the script
python scripts/generate_relay_map.py
- name: Check for changes
id: git-check
run: |
git add assets/relay_locations_static.png assets/relay_locations_heatmap.png assets/relay_locations_interactive.html
git diff --staged --exit-code || echo "changes=true" >> $GITHUB_OUTPUT
- name: Commit and push changes
if: steps.git-check.outputs.changes == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Update relay location maps - $(date -u)"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}