Skip to content

Commit 7b336ac

Browse files
authored
Merge pull request #1 from switch2osm/main
update from source
2 parents 0b728cc + 5dec9a6 commit 7b336ac

34 files changed

+1138
-61
lines changed
Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ jobs:
1414
update-en-yml:
1515
name: Process changes in English menu items
1616
runs-on: ubuntu-latest
17-
outputs:
18-
has_changes: ${{ steps.check_changes.outputs.has_changes }}
1917
env:
2018
MKDOCS_FILE: "mkdocs.yml"
2119
TARGET_FILE: "./docs/en/en.yml"
20+
# push back to the branch that triggered the workflow (safe default)
21+
BRANCH: ${{ github.ref_name }}
2222

2323
steps:
2424
- name: ⬇️ Checkout repository
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v6
2626

2727
- name: 🧰 Set up yq
2828
uses: mikefarah/yq@v4
29+
with:
30+
cmd: yq
2931

3032
- name: 📝 Update en.yml
3133
run: |
@@ -41,29 +43,22 @@ jobs:
4143
4244
rm "$TMP_FILE"
4345
44-
- name: Check if something has been changed in en.yaml
45-
id: check_changes
46+
- name: Commit ${{ env.TARGET_FILE }} if changed
4647
run: |
47-
if git diff-index --quiet HEAD -- "${TARGET_FILE}"; then
48-
echo "No changes detected in ${TARGET_FILE}"
49-
echo "has_changes=false" >> $GITHUB_OUTPUT
50-
else
51-
echo "Changes detected in ${TARGET_FILE}"
52-
echo "Git diff output:"
53-
git diff HEAD -- "${TARGET_FILE}" || true
54-
echo "has_changes=true" >> $GITHUB_OUTPUT
55-
fi
48+
set -euo pipefail
5649
57-
- name: Commit changes
58-
if: steps.check_changes.outputs.has_changes == 'true'
59-
run: |
6050
git config user.name "github-actions[bot]"
6151
git config user.email "github-actions[bot]@users.noreply.github.com"
62-
git add "${TARGET_FILE}"
63-
git commit -m "Changes in ${TARGET_FILE}"
64-
git push
6552
66-
- name: No changes detected
67-
if: steps.check_changes.outputs.has_changes == 'false'
68-
run: |
69-
echo "No changes to commit."
53+
# Stage first, then check what's actually pending
54+
[ -f "$TARGET_FILE" ] && git add -- "$TARGET_FILE" || true
55+
56+
# Nothing staged? clean exit.
57+
if [ -z "$(git status --porcelain -- "$TARGET_FILE")" ]; then
58+
echo "No changes to commit for $TARGET_FILE"
59+
exit 0
60+
fi
61+
62+
git commit -m "Changes in $TARGET_FILE"
63+
64+
git push origin "$BRANCH"

.github/workflows/test-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
test-pr:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v5
12+
- uses: actions/checkout@v6
13+
- uses: actions/setup-python@v6
1414
with:
1515
python-version: 3.x
1616
- run: pip install -r requirements.txt

.github/workflows/update-languages-in-mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: ⬇️ Checkout repository
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v6
2121

2222
- name: 🧰 Set up yq
2323
uses: mikefarah/yq@v4
@@ -146,7 +146,7 @@ jobs:
146146
147147
- name: 🚀 Trigger deploy workflow
148148
if: steps.check_changes.outputs.has_changes == 'true'
149-
uses: peter-evans/repository-dispatch@v3
149+
uses: peter-evans/repository-dispatch@v4
150150
with:
151151
event-type: trigger-deploy
152152

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ---- Build Stage ----
2-
FROM docker.io/python:3.13-bookworm AS builder
2+
FROM docker.io/python:3.14-bookworm AS builder
33

44
# Create non-root user and set up environment
55
RUN useradd -m builder && \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ See the issues for things to work on.
1717

1818
Exceptions are
1919
* planet.openstreetmap.org, for OSM data itself
20-
* openstreetmapdata.com, for coastlines and other preprocessed data
20+
* osmdata.openstreetmap.de, for coastlines and other preprocessed data
2121
* Natural Earth and other well-used public data sources
2222

2323
## Content technical needs ##
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
su -
2+
apt install \
3+
sudo screen locate libapache2-mod-tile \
4+
renderd git tar unzip wget bzip2 apache2 \
5+
lua5.1 mapnik-utils python3-mapnik \
6+
python3-psycopg2 python3-yaml gdal-bin \
7+
node-carto postgresql postgresql-contrib \
8+
postgis postgresql-17-postgis-3 \
9+
postgresql-17-postgis-3-scripts osm2pgsql \
10+
net-tools curl

docs/assets/using-tiles/build.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { colorful } from "@versatiles/style";
2+
import { writeFileSync } from "node:fs";
3+
4+
const style = colorful({
5+
baseUrl: "https://example.com",
6+
glyphs: "/fonts/{fontstack}/{range}.pbf",
7+
sprite: [{ id: 'basics', url: "/sprites/basics/sprites" }],
8+
tiles: ["https://vector.openstreetmap.org/shortbread_v1/{z}/{x}/{y}.mvt"]
9+
});
10+
writeFileSync("release/style.json", JSON.stringify(style));

docs/en/en.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ en:
3333
# Menu item name for the side menu
3434
OpenLayers: Getting started with OpenLayers
3535
# Menu item name for the side menu
36+
MapLibre: Getting started with MapLibre GL
37+
# Menu item name for the side menu
3638
Vector Tiles: Power of Vector Map Tiles
3739
# Menu item name for the "Serving Tiles" tab
3840
Serving: Serving Tiles

docs/en/serving-tiles/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are setting up your own tile server, we recommend that you use [Ubuntu Li
2020

2121
## The options
2222

23-
1. Install locally on [Debian 12](manually-building-a-tile-server-debian-12.md), [Ubuntu 24.04](manually-building-a-tile-server-ubuntu-24-04-lts.md), or [Debian 11](manually-building-a-tile-server-debian-11.md).
23+
1. Install locally on [Debian 13](manually-building-a-tile-server-debian-13.md), [Debian 12](manually-building-a-tile-server-debian-12.md), [Ubuntu 24.04](manually-building-a-tile-server-ubuntu-24-04-lts.md), or [Debian 11](manually-building-a-tile-server-debian-11.md).
2424

2525
2. Use [docker](using-a-docker-container.md).
2626

@@ -31,7 +31,7 @@ Serving your own maps is a fairly intensive task. Depending on the size of the a
3131
We would recommend that you begin with extracts of OpenStreetMap data – for example, a city, county or small country – rather than spending a week importing the whole world (planet.osm) and then having to restart because of a configuration mistake! You can download extracts from:
3232

3333
* [Geofabrik](https://download.geofabrik.de/){: target=_blank} (countries and provinces)
34-
* [Protomaps Extracts](https://protomaps.com/extracts){: target=_blank} (minutely-updated cities and small countries)
34+
* [slice.openstreetmap.us](https://slice.openstreetmap.us){: target=_blank} (minutely-updated cities and small countries)
3535
* [download.openstreetmap.fr](https://download.openstreetmap.fr/){: target=_blank}
3636

3737
## The toolchain

docs/en/serving-tiles/manually-building-a-tile-server-debian-11.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Now that all of the necessary software is installed, you will need to download a
126126

127127
The style we'll use here is the one that use by the "standard" map on the openstreetmap.org website. It's chosen because it's well documented, and should work anywhere in the world (including in places with non-latin placenames). There are a couple of downsides though - it's very much a compromise designed to work globally, and it's quite complicated to understand and modify, should you need to do that.
128128

129-
The home of "OpenStreetMap Carto" on the web is <https://github.com/gravitystorm/openstreetmap-carto/>{: target=_blank}, and it has it's own installation instructions at <https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md>{: target=_blank}, although we'll cover everything that needs to be done here.
129+
The home of "OpenStreetMap Carto" on the web is <https://github.com/gravitystorm/openstreetmap-carto/>{: target=_blank}, and it has its own installation instructions at <https://github.com/gravitystorm/openstreetmap-carto/blob/master/INSTALL.md>{: target=_blank}, although we'll cover everything that needs to be done here.
130130

131131
Here we're assuming that we're storing the stylesheet details in a directory below `~/src` below the home directory of the whichever non-root account you are using:
132132

0 commit comments

Comments
 (0)