aboutsummaryrefslogtreecommitdiff
path: root/travis/deploy_website.sh
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-06-25 23:03:24 +0200
committerEven Rouault <even.rouault@spatialys.com>2018-06-25 23:03:24 +0200
commita1b1e1ea32f8f5f6c6184afe64b8be1c6884e28b (patch)
tree72617387f8e5b0794450a9df478bdd150f58aee0 /travis/deploy_website.sh
parent17485da88101e9079f4137024a2cdd4063c5ad21 (diff)
downloadPROJ-a1b1e1ea32f8f5f6c6184afe64b8be1c6884e28b.tar.gz
PROJ-a1b1e1ea32f8f5f6c6184afe64b8be1c6884e28b.zip
deploy_website.sh: update gh-pages with a single force-pushed commit (fixes #1059)
This will avoid the history of gh-pages to grow indifinitely, and thus the size of the PROJ git repository, whereas it has heavy binary objects like proj.pdf that are modified by each commit.
Diffstat (limited to 'travis/deploy_website.sh')
-rwxr-xr-xtravis/deploy_website.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/travis/deploy_website.sh b/travis/deploy_website.sh
index 07e2c556..387778be 100755
--- a/travis/deploy_website.sh
+++ b/travis/deploy_website.sh
@@ -3,22 +3,27 @@
builddir=$1
destdir=$2
-
-git clone git@github.com:OSGeo/proj.4.git $destdir/projdocs
-cd $destdir/projdocs
-git checkout gh-pages
-
+rm -rf $destdir/projdocs
+mkdir -p $destdir/projdocs
cd $builddir/html
cp -rf * $destdir/projdocs
cp $builddir/latex/proj.pdf $destdir/projdocs
cd $destdir/projdocs
+git init
+git checkout -b gh-pages
+git remote add origin git@github.com:OSGeo/proj.4.git
+
git config user.email "proj4bot@proj4.bot"
git config user.name "proj.4 deploybot"
+# A few files we must manually create
+echo "_site" > .gitignore
+touch .nojekyll
+echo "proj4.org" > CNAME
git add -A
git commit -m "update with results of commit https://github.com/OSGeo/proj.4/commit/$TRAVIS_COMMIT"
-git push origin gh-pages
+git push -f origin gh-pages