Skip to content

Build tilemaker exports #39

Build tilemaker exports

Build tilemaker exports #39

name: Build tilemaker exports
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
AREA: nova-scotia
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Fetch supporting GeoJSON and QRank files
run: wget --progress=dot:giga https://github.com/hikeratlas/qrank/releases/download/latest/qrank.db
- name: Fetch PBF
run: wget --progress=dot:giga https://public.hikeratlas.com/pbfs/$AREA.pbf
- name: Export
env:
# -w ${{ github.workspace }}/export is a bit gross, but is needed for Lua
# to resolve file imports.
TILEMAKER: docker run --env DUMP_FILENAME --rm -w ${{ github.workspace }}/export -v ${{ github.workspace }}:${{ github.workspace }} ghcr.io/cldellow/tilemaker:pr-4
run: ./export/export-all $AREA.pbf
- name: Upload GeoJSON
env:
AWS_ENDPOINT_URL: https://ce5627cfc65c8b54d40bb91c0ba7298b.r2.cloudflarestorage.com
AWS_EC2_METADATA_DISABLED: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
FILE: parks.geojsonl
run: rm -f *.zst && zstd -9 $FILE && aws s3 cp --no-progress "$FILE".zst s3://hikes-public/geojsonl/"$FILE".zst