2018-03-11 00:12:52 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
|
|
|
P="$(mktemp -d)"
|
2019-11-25 21:31:39 +00:00
|
|
|
mkdir "$P/git" "$P/out"
|
2018-03-11 00:12:52 +00:00
|
|
|
|
|
|
|
if [ "$encrypted_1671ba5f199a_key" ]
|
|
|
|
then
|
|
|
|
eval "$(ssh-agent -s)"
|
2019-11-25 21:31:39 +00:00
|
|
|
openssl aes-256-cbc -K "$encrypted_1671ba5f199a_key" \
|
|
|
|
-iv "$encrypted_1671ba5f199a_iv" \
|
2018-03-11 00:12:52 +00:00
|
|
|
-in .github/deploy_key.enc -out .github/deploy_key -d
|
|
|
|
chmod 600 .github/deploy_key
|
|
|
|
ssh-add .github/deploy_key
|
|
|
|
|
2019-12-26 17:36:27 +00:00
|
|
|
pip install git+https://github.com/spanezz/staticsite.git@v1.2
|
2018-03-11 00:12:52 +00:00
|
|
|
fi
|
|
|
|
|
2019-11-25 21:31:39 +00:00
|
|
|
git clone --depth=10 --branch=gh-pages "git@github.com:${TRAVIS_REPO_SLUG}.git" "$P/git"
|
2018-03-11 00:12:52 +00:00
|
|
|
|
2019-06-19 19:03:30 +00:00
|
|
|
rm -Rfv dosage.egg-info
|
2019-11-25 21:31:39 +00:00
|
|
|
ssite build --output "$P/out"
|
2018-03-11 00:12:52 +00:00
|
|
|
|
2020-04-13 10:21:22 +00:00
|
|
|
rsync -r --del --verbose --cvs-exclude --exclude-from .github/website-exclude \
|
|
|
|
"$P/out/" "$P/git"
|
2018-03-11 00:12:52 +00:00
|
|
|
|
2019-11-25 21:31:39 +00:00
|
|
|
cd "$P/git"
|
2018-03-11 00:12:52 +00:00
|
|
|
|
|
|
|
git config user.email 'nobody@23.gs'
|
|
|
|
git config user.name 'Travis-CI Website Bot'
|
|
|
|
git config push.default simple
|
|
|
|
|
|
|
|
git add -A .
|
|
|
|
if [ "$TRAVIS_COMMIT" ]
|
|
|
|
then
|
2019-12-05 20:35:31 +00:00
|
|
|
git commit -a -m "Update website from commit $TRAVIS_COMMIT" || true
|
2018-03-11 00:12:52 +00:00
|
|
|
git push origin HEAD:gh-pages
|
|
|
|
fi
|
|
|
|
|