File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4646 run : |
4747 sha=$(git rev-parse --short ${{ github.sha }})
4848 echo "Publishing main branch (commit $sha) to gh-pages"
49- ./scripts/ci_deploy_gh_pages.sh build $sha ${{ secrets.GITHUB_TOKEN }}
49+ ./scripts/ci_deploy_gh_pages.sh ${{ github.workspace }}/ build $sha ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 33# MapServer-documentation repo. Called from build.yml when a push to main
44# is detected
55
6+ set -euo pipefail
7+
68builddir=$1
79sha=$2
810github_token=$3
911
10- git config user.email " mapserverbot@mapserver.bot"
11- git config user.name " MapServer deploybot"
12+ git config --global user.email " mapserverbot@mapserver.bot"
13+ git config --global user.name " MapServer deploybot"
1214
13- git clone --no-checkout -- depth=1 \
14- https://x-access-token:${github_token} @github.com/mapserver /MapServer-documentation.git \
15+ git clone --depth=1 \
16+ https://x-access-token:${github_token} @github.com/MapServer /MapServer-documentation.git \
1517 /tmp/MapServer-documentation
1618
1719cd /tmp/MapServer-documentation
18- git checkout -B gh-pages
20+ git fetch origin gh-pages
21+ git checkout -B gh-pages origin/gh-pages
1922
2023# delete existing files
21- git rm -r * --quiet || true
24+ git rm -rf --quiet --ignore-unmatch .
25+
2226
2327# add in the new build files
24- cp -rf " $builddir /html/" * .
28+ cp -a " $builddir /html/. " .
2529touch .nojekyll
2630
2731git 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
32+ git commit -m " update with results of commit https://github.com/MapServer /MapServer-documentation/commit/$sha " --quiet || echo " Nothing to commit"
33+ git push origin gh-pages
You can’t perform that action at this time.
0 commit comments