@@ -107,7 +107,7 @@ echo "Aiming to deploy $SOURCE_DIR to $DEST_SLUG branch gh-pages as $DEST_DIR"
107107# We have to create the SSH key with spaces and new lines, so
108108# we un-escape whitespace and newline characters to recover
109109# the SSH deploy key:
110- python -c " import os; print(os.environ['DOC_KEY'].strip().replace(r'\ ', ' ').replace(r'\n', '\n'))" > $HOME /.biopython_doc_deploy.key
110+ python -c " import os; print(os.environ['DOC_KEY'].strip().replace(r'\ ', ' ').replace(r'\n', '\n'))" > $HOME /.biopython_doc_deploy.key
111111# Check we have a sane looking line structure:
112112if [ $( grep -c " ^\-\-\-\-\-" $HOME /.biopython_doc_deploy.key) -ne 2 ]; then
113113 echo " ERROR: Failed to rebuild the SSH key,"
@@ -145,6 +145,12 @@ echo "Copying files"
145145cp -R $SOURCE_DIR /* $DEST_DIR /
146146echo " Staging files in git"
147147git add $DEST_DIR /
148+ if [[ " dev" != " $DEST_DIR " ]]; then
149+ echo " Updating version"
150+ rm -rf latest
151+ ln -s $VER latest
152+ git commit latest -m " Automated version bump via ${COMMIT_HASH} "
153+ fi
148154
149155echo " Preparing to deploy documentation"
150156
@@ -154,13 +160,7 @@ else
154160 echo " Making commit of new files"
155161 git config user.email " sphinx@example.org"
156162 git config user.name " Sphinx"
157- git commit -m " Automated update ${COMMIT_HASH} "
158- if [[ " dev" != " $DEST_DIR " ]]; then
159- echo " Updating version"
160- rm -rf latest
161- ln -s $VER latest
162- git commit latest -m " Automated version bump via ${COMMIT_HASH} "
163- fi
163+ git commit -m " Biopython $DEST_DIR docs as of ${COMMIT_HASH} "
164164 echo " Finally, pushing to $DEST_SLUG gh-pages branch"
165165 git push origin gh-pages
166166 echo " Documentation deployed!"
0 commit comments