configure Antora and CI workflow to support partial build (single version)
- upgrade to Antora 3.2.0-alpha.2 - upgrade release-line-extension to 1.0.0-alpha.2 - add atlas-extension - add local autoconfig-partial-build extension - configure deploy-docs.yml workflow to detect and set up partial build - configure publish-docs.sh script to sync partial build
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
FROM=build/site
|
||||
HOST="$1"
|
||||
HOST_PATH="$2"
|
||||
SSH_PRIVATE_KEY="$3"
|
||||
@@ -13,10 +14,16 @@ fi
|
||||
|
||||
(
|
||||
set -e
|
||||
set -f
|
||||
install -m 600 -D /dev/null "$SSH_PRIVATE_KEY_PATH"
|
||||
echo "$SSH_PRIVATE_KEY" > "$SSH_PRIVATE_KEY_PATH"
|
||||
echo "$SSH_KNOWN_HOST" > ~/.ssh/known_hosts
|
||||
rsync --delete -avze "ssh -i $SSH_PRIVATE_KEY_PATH" build/site/ "$HOST:$HOST_PATH"
|
||||
RSYNC_OPTS='-avz --delete'
|
||||
if [ -n "$BUILD_REFNAME" ]; then
|
||||
RSYNC_OPTS="-n $RSYNC_OPTS$(find $FROM -mindepth 1 -maxdepth 1 \! -name 404.html \! -name '.*' -type f -printf ' --include /%P')"
|
||||
RSYNC_OPTS="$RSYNC_OPTS$(find $FROM -mindepth 1 -maxdepth 1 -type d \! -name _ -printf ' --include /%P --include /%P/**') --exclude **"
|
||||
fi
|
||||
rsync $RSYNC_OPTS -e "ssh -i $SSH_PRIVATE_KEY_PATH" $FROM/ "$HOST:$HOST_PATH"
|
||||
)
|
||||
exit_code=$?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user