Skip to content

Commit

Permalink
Merge pull request #11326 from rouault/doc_stable
Browse files Browse the repository at this point in the history
Preparatory steps to have https://gdal.org default to a 'stable' branch
  • Loading branch information
rouault authored Nov 21, 2024
2 parents e229c29 + 8148992 commit ab9653e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
47 changes: 47 additions & 0 deletions .github/workflows/auto_tag_stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Update Stable Tag

on:
push:
branches:
- '**' # Matches all branches, but we later filter on the one matching the STABLE_BRANCH repository variable

permissions:
contents: read

jobs:
update-stable-tag:
runs-on: ubuntu-latest
if: github.repository == 'OSGeo/GDAL'
permissions:
contents: write
steps:
- name: Check branch match
id: check_branch
env:
STABLE_BRANCH: ${{ vars.STABLE_BRANCH }} # Repository variable
run: |
echo "Push detected on branch $GITHUB_REF"
if [[ "${GITHUB_REF#refs/heads/}" != "${STABLE_BRANCH}" ]]; then
echo "This workflow only runs for branch $STABLE_BRANCH. Skipping further steps."
echo "run=false" >> $GITHUB_OUTPUT
else
echo "run=true" >> $GITHUB_OUTPUT
fi
- name: Checkout code
if: steps.check_branch.outputs.run == 'true'
uses: actions/checkout@v4

- name: Tag
if: steps.check_branch.outputs.run == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GDAL-bot"
touch .dummy-file
git add .dummy-file
# Do that so that stable doesn't have the same git sha as the stable branch, so ReadTheDocs triggers a build
git commit -a -m "Add .dummy-file"
git checkout -b stable
git push -f origin stable
5 changes: 5 additions & 0 deletions HOWTO-RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ Process :

15) Once the vote has positively completed,

15.0) For a new feature release, update the STABLE_BRANCH repository variable

Go to https://github.com/OSGeo/GDAL/settings/variables/actions/STABLE_BRANCH
and update the value to be release/x.y

15.1) Tag the release as final:

git checkout v3.1.0RC1
Expand Down
4 changes: 3 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,9 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_extra_path = ["../build/html_extra"]

# For generated content and robots.txt
html_extra_path = ["../build/html_extra", "extra_path"]

html_js_files = ["announcement.js"]
html_css_files = ["announcement.css"]
Expand Down
4 changes: 4 additions & 0 deletions doc/source/extra_path/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Allow: /en/stable/
Disallow: /en/
Sitemap: https://gdal.org/sitemap.xml

0 comments on commit ab9653e

Please sign in to comment.