authelia/.buildkite/steps/syncdoc.sh
Clément Michaud 9c0e722bd7
[DOCS] Do not let think OAuth won't be supported. (#665)
* [DOCS] Do not let think OAuth won't be supported.

* [Buildkite] Prevent docs commit if there are no changes
2020-02-29 23:07:23 +11:00

26 lines
467 B
Bash
Executable File

#!/bin/bash
set -e
rm -rf authelia
git clone git@github.com:authelia/authelia.git --single-branch --branch gh-pages
pushd docs
bundle install
bundle exec jekyll build -d ../authelia
popd
COMMIT=$(git show -s --format=%h)
pushd authelia
git config user.name "Authelia[bot]"
git config user.email "autheliabot@gmail.com"
git status | grep "nothing to commit" && exit
git add -A
git commit -m "Synchronize docs of commit: ${COMMIT}"
git push
popd
rm -rf authelia