Skip to content

Add support for planned routes in GeoJSON and update asset management #4

Add support for planned routes in GeoJSON and update asset management

Add support for planned routes in GeoJSON and update asset management #4

# Runs the Processing pipeline (GPX download from Dropbox + municipality matching),
# builds the frontend with the freshly generated assets and deploys everything to
# GitHub Pages. The generated assets are never committed to the repo.
name: Process and Deploy
on:
push:
branches: ['main']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: 'pages'
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
# tippecanoe (used by TrackExporter to build the tracks pmtiles) is not packaged
# for ubuntu, so build it from source once and cache the binaries
- name: Cache tippecanoe
id: cache-tippecanoe
uses: actions/cache@v4
with:
path: ~/tippecanoe-bin
key: tippecanoe-${{ runner.os }}-v1
- name: Build tippecanoe
if: steps.cache-tippecanoe.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/felt/tippecanoe.git /tmp/tippecanoe
make -C /tmp/tippecanoe -j"$(nproc)"
mkdir -p ~/tippecanoe-bin
cp /tmp/tippecanoe/tippecanoe ~/tippecanoe-bin/
- name: Add tippecanoe to PATH
run: echo "$HOME/tippecanoe-bin" >> "$GITHUB_PATH"
- name: Run processing pipeline
working-directory: GeoQuest25.Processing
env:
Dropbox__AppKey: ${{ secrets.DROPBOX_APP_KEY }}
Dropbox__AppSecret: ${{ secrets.DROPBOX_APP_SECRET }}
Dropbox__RefreshToken: ${{ secrets.DROPBOX_REFRESH_TOKEN }}
Gpx__RoutesSecret: ${{ secrets.GPX_ROUTES_SECRET }}
run: dotnet run --project GeoQuest25.Processing --configuration Release
- name: Build Angular App
run: |
cd GeoQuest25.Frontend
npm install
npm run build -- --base-href=/GeoQuest25/
- name: Setup Pages
uses: actions/configure-pages@v6
- name: Upload artifact
uses: actions/upload-pages-artifact@v5
with:
path: './GeoQuest25.Frontend/dist/geo-quest25/browser'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5