[docs] update docs hook to report actions
This commit is contained in:
parent
9453e9203a
commit
5de5f7bf26
1 changed files with 8 additions and 0 deletions
|
|
@ -6,10 +6,12 @@ REMOTE_NAME="${1:-}"
|
||||||
REMOTE_URL="${2:-}"
|
REMOTE_URL="${2:-}"
|
||||||
|
|
||||||
if [[ "${MEANAS_DOCS_PUBLISHING:-0}" == "1" ]]; then
|
if [[ "${MEANAS_DOCS_PUBLISHING:-0}" == "1" ]]; then
|
||||||
|
echo "[meanas docs hook] recursive docs publish detected; skipping" >&2
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$REMOTE_NAME" != "origin" ]]; then
|
if [[ "$REMOTE_NAME" != "origin" ]]; then
|
||||||
|
echo "[meanas docs hook] push was to remote '${REMOTE_NAME:-<none>}' not 'origin'; skipping" >&2
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -22,6 +24,7 @@ while read -r local_ref local_sha remote_ref remote_sha; do
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$publish_docs" != "1" ]]; then
|
if [[ "$publish_docs" != "1" ]]; then
|
||||||
|
echo "[meanas docs hook] no master->master update in push; skipping docs publish" >&2
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -36,6 +39,11 @@ fi
|
||||||
DOCS_SITE_URL="${DOCS_SITE_URL:-$(git config --get meanas.docsSiteUrl || true)}"
|
DOCS_SITE_URL="${DOCS_SITE_URL:-$(git config --get meanas.docsSiteUrl || true)}"
|
||||||
export DOCS_SITE_URL
|
export DOCS_SITE_URL
|
||||||
|
|
||||||
|
if [[ -n "$DOCS_SITE_URL" ]]; then
|
||||||
|
echo "[meanas docs hook] publishing docs for ${DOCS_SITE_URL}" >&2
|
||||||
|
else
|
||||||
|
echo "[meanas docs hook] DOCS_SITE_URL is unset; building docs with relative site_url" >&2
|
||||||
|
fi
|
||||||
echo "[meanas docs hook] building docs after push to ${REMOTE_NAME} (${REMOTE_URL})" >&2
|
echo "[meanas docs hook] building docs after push to ${REMOTE_NAME} (${REMOTE_URL})" >&2
|
||||||
MEANAS_DOCS_PUBLISHING=1 ./make_docs.sh
|
MEANAS_DOCS_PUBLISHING=1 ./make_docs.sh
|
||||||
echo "[meanas docs hook] publishing docs-site branch" >&2
|
echo "[meanas docs hook] publishing docs-site branch" >&2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue