aboutsummaryrefslogtreecommitdiff
path: root/travis/deploy-github-pages.sh
blob: b5ead0be1850c2fdae3a33d272bdbd34845e476c (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
#!/bin/sh

set -e
set -x

GITVERSION=$(git describe --tags)

mkdir build.i3wm.org
cp -r deb/COPY-DOCS build.i3wm.org/docs
cd build.i3wm.org
echo build.i3wm.org > CNAME
# Disallow search engine indexing for build.i3wm.org: users should find the
# release version instead, and only developers should use build.i3wm.org.
echo 'User-Agent: *' > robots.txt
echo 'Disallow: /' >> robots.txt
git init

git config user.name "Travis CI"
git config user.email "i3bot@i3wm.org"
git add .
git commit -m "Publish docs/static analysis for github.com/i3/i3 v${GITVERSION}"

# Hide stdout/stderr because it might contain sensitive info.
set +x
echo "git push"
git push --force --quiet "https://${GH_TOKEN}@github.com/i3/build.i3wm.org.git" master:gh-pages >/dev/null 2>&1