aboutsummaryrefslogtreecommitdiff
path: root/travis/deploy_website.sh
blob: ae96bad69a4a89872d31631edc276901320d7d35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

builddir=$1
destdir=$2

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.git

git config user.email "proj.bot@proj.bot"
git config user.name "PROJ deploybot"

# A few files we must manually create
echo "_site" > .gitignore
touch .nojekyll
echo "proj.org" > CNAME

git add -A
git commit -m "update with results of commit https://github.com/OSGeo/PROJ/commit/$TRAVIS_COMMIT"
git push -f origin gh-pages