github.com/m3db/m3@v1.5.1-0.20231129193456-75a402aa583b/.buildkite/scripts/docs_push.sh (about) 1 #!/bin/ash 2 # shellcheck shell=dash 3 4 set -exo pipefail 5 6 if [ "$BUILDKITE_BRANCH" != "master" ]; then 7 echo "nothing to do" 8 exit 0 9 fi 10 11 mkdir -p "$HOME/.ssh" 12 ssh-keyscan github.com >> "$HOME/.ssh/known_hosts" 13 git config --local user.email "buildkite@m3db.io" 14 git config --local user.name "M3 Buildkite Bot" 15 16 # Also build & push the operator's docs. 17 git clean -dffx 18 git checkout -t origin/operator 19 git pull 20 21 git clone git@github.com:m3db/m3db-operator.git 22 23 ( 24 cd m3db-operator 25 mkdocs build -t material 26 ) 27 28 if diff -qr m3db-operator/site m3db.io; then 29 echo "no operator docs changes" 30 exit 0 31 fi 32 33 rm -rf m3db.io/* 34 cp -r m3db-operator/site/* m3db.io 35 git clean -dffx -e m3db.io 36 git add m3db.io 37 git commit -m "Operator docs update $(date)" 38 git push