Deploy #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_dispatch: ~ | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
jobs: | |
deploy-proxy: | |
name: Deploy proxy | |
runs-on: ubuntu-latest | |
environment: proxy-production | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Setup Fly | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Deploy | |
run: | | |
flyctl deploy --config proxy.fly.toml --local-only | |
deploy-tiles: | |
name: Deploy tiles | |
runs-on: ubuntu-latest | |
environment: tiles-production | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Setup Fly | |
uses: superfly/flyctl-actions/setup-flyctl@master | |
- name: Download data | |
run: | | |
curl --progress-bar https://download.geofabrik.de/europe/netherlands-latest.osm.pbf --output data/data.osm.pbf | |
- name: Import data | |
env: | |
OSM2PGSQL_NUMPROC: 4 | |
OSM2PGSQL_CACHE: 2000 | |
run: | | |
docker compose run --build import | |
- name: Generate tiles | |
run: | | |
docker compose up --build martin-cp | |
- name: Print tiles summary | |
run: | | |
docker run --rm -v $PWD:/code --entrypoint mbtiles ghcr.io/maplibre/martin summary /code/tiles/standard.mbtiles | |
docker run --rm -v $PWD:/code --entrypoint mbtiles ghcr.io/maplibre/martin summary /code/tiles/speed.mbtiles | |
docker run --rm -v $PWD:/code --entrypoint mbtiles ghcr.io/maplibre/martin summary /code/tiles/signals.mbtiles | |
docker run --rm -v $PWD:/code --entrypoint mbtiles ghcr.io/maplibre/martin summary /code/tiles/electrification.mbtiles | |
docker run --rm -v $PWD:/code --entrypoint mbtiles ghcr.io/maplibre/martin summary /code/tiles/gauge.mbtiles | |
- name: Deploy | |
run: | | |
flyctl deploy --config martin-static.fly.toml --local-only |