Skip to content

Commit

Permalink
Fix mkdocs/mike publisging script
Browse files Browse the repository at this point in the history
  • Loading branch information
rconway committed Feb 27, 2024
1 parent 0ff9c5d commit bfc00cb
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions publish
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ mike deploy --push --update-aliases "${VERSION}" ${ALIAS}
EOF
}

sshAgent() {
if [[ -n "${SSH_AUTH_SOCK}" ]]; then
echo -n "-v ${SSH_AUTH_SOCK}:/ssh-agent -e SSH_AUTH_SOCK=/ssh-agent"
fi
}

# publish
command | docker run --name mkdocs-deploy --rm -i \
-v ${PWD}:/docs \
-v ${HOME}/.ssh:/root/.ssh \
-v ${SSH_AUTH_SOCK}:/ssh-agent \
-e SSH_AUTH_SOCK=/ssh-agent \
$(sshAgent) \
--entrypoint="sh" \
eoepca/mkdocs-material \
-
Expand Down

0 comments on commit bfc00cb

Please sign in to comment.