File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 2828 mkdir -p ~/.ssh
2929 echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
3030 chmod 600 ~/.ssh/id_rsa
31- echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
31+ echo -e "Host *\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
3232
33- touch ./build/html/.nojekyll
33+ touch ./build/html/.nojekyll
3434
3535 # get the short commit tag
3636 sha=$(git rev-parse --short ${{ github.sha }})
Original file line number Diff line number Diff line change @@ -4,27 +4,38 @@ builddir=$1
44destdir=$2
55sha=$3
66
7+ # check the PDF was created and upload to https://mapserver.org/pdf/MapServer.pdf
78if [ -f $builddir /latex/en/MapServer.pdf ]; then
89 set -x
910 scp
$builddir /latex/en/MapServer.pdf
[email protected] :/var/www/mapserver.org/pdf/
1011 set +x
1112fi
1213
13-
1414if [ ! -d $destdir /mapserver.github.io ]; then
1515 git clone
[email protected] :mapserver/mapserver.github.io.git
$destdir /mapserver.github.io
1616fi
1717
18+ # remove all previous files in the repo if [build_translations]
19+ # is in the commit message
20+ git log -n1 | grep -q " \\ [build_translations\\ ]"
21+
22+ if [[ $? -eq 0 ]]; then
23+ rm -rf " $destdir /mapserver.github.io" /*
24+ fi
25+
26+ # copy in the newly created files
1827cd $builddir /html
1928cp -rf * $destdir /mapserver.github.io
2029
2130cd $destdir /mapserver.github.io
31+
32+ # restore README.md and .nojekyll from the last commit
33+ git checkout HEAD -- README.md
34+ git checkout HEAD -- .nojekyll
35+
2236git config user.email
" [email protected] " 2337git config user.name " MapServer deploybot"
2438
25- # rm -rf _sources */_sources
26- # rm -rf .doctrees */.doctrees */.buildinfo
27-
2839git add -A
2940git commit -m " update with results of commit https://github.com/mapserver/MapServer-documentation/commit/$sha "
3041git push origin master
You can’t perform that action at this time.
0 commit comments