Skip to content

Commit 6246259

Browse files
authored
Merge branch 'MapServer:main' into main
2 parents b216eed + 7458338 commit 6246259

8 files changed

Lines changed: 53 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: [push, pull_request, workflow_dispatch]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
810

911
steps:
1012
- name: Checkout repository contents
@@ -16,12 +18,14 @@ jobs:
1618
python-version: 3.13
1719

1820
- name: Build docs
21+
env:
22+
GIT_BRANCH: ${{ github.ref_name }}
1923
run: |
2024
pip install -r requirements.txt
21-
echo "GIT_BRANCH=$(echo $GITHUB_REF | cut -d '/' -f 3)" >> $GITHUB_ENV
2225
./scripts/ci_build_docs.sh
2326
24-
- name: After success steps
27+
# Deploy release branch to mapserver.github.io
28+
- name: Deploy to mapserver.github.io
2529
if: ${{ success() && github.event_name == 'push' && github.repository == 'MapServer/MapServer-documentation' && github.ref_name == 'branch-8-6' }}
2630
run: |
2731
# setup the SSH key
@@ -36,3 +40,11 @@ jobs:
3640
sha=$(git rev-parse --short ${{ github.sha }})
3741
echo "publish website using $GIT_BRANCH branch and commit $sha"
3842
./scripts/ci_deploy_website.sh build /tmp $sha
43+
44+
# Deploy main branch to gh-pages branch (same repo)
45+
- name: Deploy to gh-pages
46+
if: ${{ success() && github.event_name == 'push' && github.repository == 'MapServer/MapServer-documentation' && github.ref_name == 'main' }}
47+
run: |
48+
sha=$(git rev-parse --short ${{ github.sha }})
49+
echo "Publishing main branch (commit $sha) to gh-pages"
50+
./scripts/ci_deploy_gh_pages.sh ${{ github.workspace }}/build $sha ${{ secrets.GITHUB_TOKEN }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ BUILD_LANGUAGES = $(TRANSLATIONS)
1919
# Internal variables.
2020
PAPEROPT_a4 = -D latex_paper_size=a4
2121
PAPEROPT_letter = -D latex_paper_size=letter
22-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees/$$lang $(SPHINXOPTS) -c . -A language=$$lang -D language=$$lang -A languages='$(LANGUAGES)' -A branch=$(GIT_BRANCH)
22+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees/$$lang $(SPHINXOPTS) -c . -A language=$$lang -D language=$$lang -A languages='$(LANGUAGES)'
2323

2424
ALLSPHINXOPTSI18N = $(SPHINXOPTS) -c . -a -A language=$$lang -D language=$$lang -A languages='$(LANGUAGES)'
2525

_templates/layout.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
{% block relbar1 %}
44

55

6-
<!-- for main branch only, do not backport this -->
76
{%- if branch == 'main' %}
7+
<!-- add a ribbon to show these docs are the main branch -->
88
<h4 class="ribbon">DOCS PREVIEW</h4>
99
{%- endif %}
1010

conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# All configuration values have a default; values that are commented out
1212
# serve to show the default.
1313

14-
import sys, os, shutil
14+
import sys, os
1515
import inspect
1616
from unittest.mock import MagicMock #py3 only
1717

@@ -243,8 +243,8 @@ def __getattr__(cls, name):
243243
html_theme = "classic"
244244

245245
# Add the branch name as a variable that can be used in templates
246-
# this can be set as a sphinx-build option using `-A BRANCH=main`
247-
html_context = {'branch': release}
246+
# Defaults to 'local'if GIT_BRANCH isn't set (e.g. local builds)
247+
html_context = {'branch': os.environ.get('GIT_BRANCH', 'local')}
248248

249249
# linkcheck options
250250
# -----------------

en/announcements/announcements_archive.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ The security release of MapServer 8.6.3 has been issued in order to fix
3333
a vulnerability in the SLD parser. See the :ref:`changelog <changelog-8-6-3>`
3434
for the list of changes.
3535
You may also review this `Security Advisory <https://github.com/MapServer/MapServer/security/advisories/GHSA-4h8g-378q-r75m>`__,
36+
the CVE record: `CVE-2026-45104 <https://www.cve.org/CVERecord?id=CVE-2026-45104>`__,
3637
as well as MapServer's `Security Policy <https://github.com/MapServer/MapServer/blob/main/SECURITY.md>`__.
3738
As security for the 7.6 branch has ended, and branches 8.4, 8.2 & 8.0 are not supported,
3839
all users are strongly encouraged to upgrade to the MapServer 8.6.3 release (see the
@@ -57,6 +58,7 @@ The security release of MapServer 8.6.2 has been issued in order to fix
5758
a vulnerability in the OpenLayers viewer (with WMS 1.3.0 requests).
5859
See the :ref:`changelog <changelog-8-6-2>` for the list of changes.
5960
You may also review this `Security Advisory <https://github.com/MapServer/MapServer/security/advisories/GHSA-4g9f-ph64-hg2x>`__,
61+
the CVE record: `CVE-2026-42030 <https://www.cve.org/CVERecord?id=CVE-2026-42030>`__,
6062
as well as MapServer's `Security Policy <https://github.com/MapServer/MapServer/blob/main/SECURITY.md>`__.
6163
As security for the 7.6 branch has ended, and branches 8.4, 8.2 & 8.0 are not supported,
6264
all users are strongly encouraged to upgrade to the MapServer 8.6.2 release (see the

en/include/announcements.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ The security release of MapServer 8.6.3 has been issued in order to fix
2727
a vulnerability in the SLD parser. See the :ref:`changelog <changelog-8-6-3>`
2828
for the list of changes.
2929
You may also review this `Security Advisory <https://github.com/MapServer/MapServer/security/advisories/GHSA-4h8g-378q-r75m>`__,
30+
the CVE record: `CVE-2026-45104 <https://www.cve.org/CVERecord?id=CVE-2026-45104>`__,
3031
as well as MapServer's `Security Policy <https://github.com/MapServer/MapServer/blob/main/SECURITY.md>`__.
3132
As security for the 7.6 branch has ended, and branches 8.4, 8.2 & 8.0 are not supported,
3233
all users are strongly encouraged to upgrade to the MapServer 8.6.3 release (see the
@@ -51,6 +52,7 @@ The security release of MapServer 8.6.2 has been issued in order to fix
5152
a vulnerability in the OpenLayers viewer (with WMS 1.3.0 requests).
5253
See the :ref:`changelog <changelog-8-6-2>` for the list of changes.
5354
You may also review this `Security Advisory <https://github.com/MapServer/MapServer/security/advisories/GHSA-4g9f-ph64-hg2x>`__,
55+
the CVE record: `CVE-2026-42030 <https://www.cve.org/CVERecord?id=CVE-2026-42030>`__,
5456
as well as MapServer's `Security Policy <https://github.com/MapServer/MapServer/blob/main/SECURITY.md>`__.
5557
As security for the 7.6 branch has ended, and branches 8.4, 8.2 & 8.0 are not supported,
5658
all users are strongly encouraged to upgrade to the MapServer 8.6.2 release (see the

scripts/ci_build_docs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
echo "GIT_BRANCH is: $GIT_BRANCH"
23

34
git log -n1 | grep -q "\\[build_pdf\\]"
45

scripts/ci_deploy_gh_pages.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
# Deploys the main branch HTML build output to the gh-pages branch of the
3+
# MapServer-documentation repo. Called from build.yml when a push to main
4+
# is detected
5+
6+
set -euo pipefail
7+
8+
builddir=$1
9+
sha=$2
10+
github_token=$3
11+
12+
git config --global user.email "mapserverbot@mapserver.bot"
13+
git config --global user.name "MapServer deploybot"
14+
15+
git clone --depth=1 \
16+
https://x-access-token:${github_token}@github.com/MapServer/MapServer-documentation.git \
17+
/tmp/MapServer-documentation
18+
19+
cd /tmp/MapServer-documentation
20+
git checkout --orphan gh-pages
21+
git rm -rf . || true
22+
23+
# add in the new build files
24+
cp -a "$builddir/html/." .
25+
touch .nojekyll
26+
27+
git add -A
28+
git commit -m "update with results of commit https://github.com/MapServer/MapServer-documentation/commit/$sha" --quiet || echo "Nothing to commit"
29+
git push origin gh-pages --force

0 commit comments

Comments
 (0)