forked from sosy-lab/java-smt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy-gh-pages.sh
executable file
·39 lines (31 loc) · 1.33 KB
/
deploy-gh-pages.sh
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
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# This file is part of SoSy-Lab Java-Project Template,
# a collection of common files and build definitions for Java projects:
# https://gitlab.com/sosy-lab/software/java-project-template
#
# SPDX-FileCopyrightText: 2018-2020 Dirk Beyer <https://www.sosy-lab.org>
#
# SPDX-License-Identifier: Apache-2.0
set -e # exit with nonzero exit code if anything fails
# DO NOT EDIT LOCALLY!
# Keep this file synchronized with
# https://gitlab.com/sosy-lab/software/java-project-template
rm -rf gh-pages || true
mkdir -p gh-pages/api
cp -r website/* gh-pages
cp -r Javadoc/* gh-pages/api
find bin -name ConfigurationOptions.txt -exec cp {} gh-pages/ \;
# we need to tell git who we are
git config --global user.name "${GIT_NAME}"
git config --global user.email "${GIT_EMAIL}"
cd gh-pages
git init
# The first and only commit to this new Git repo contains all the
# files present with the commit message "Deploy to GitHub Pages".
git add .
git commit -m "Deploy to GitHub Pages"
# Force push from the current repo's HEAD to the remote
# repo's gh-pages branch. (All previous history on the gh-pages branch
# will be lost, since we are overwriting it.) We redirect any output to
# /dev/null to hide any sensitive credential data that might otherwise be exposed.
git push --force --quiet "https://${GH_TOKEN}@${GH_REF}" HEAD:gh-pages > /dev/null 2>&1