File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ builddir=$1
7+ sha=$2
8+ github_token=$3
9+
10+ git config user.email " mapserverbot@mapserver.bot"
11+ git config user.name " MapServer deploybot"
12+
13+ git clone --no-checkout --depth=1 \
14+ https://x-access-token:${github_token} @github.com/mapserver/MapServer-documentation.git \
15+ /tmp/MapServer-documentation
16+
17+ cd /tmp/MapServer-documentation
18+ git checkout -B gh-pages
19+
20+ # delete existing files
21+ git rm -r * --quiet || true
22+
23+ # add in the new build files
24+ cp -rf " $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
You can’t perform that action at this time.
0 commit comments