Skip to content

Commit

Permalink
Add script to deploy the doc
Browse files Browse the repository at this point in the history
  • Loading branch information
james-d-mitchell committed Nov 15, 2023
1 parent 3d31e5c commit 2e76ebc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@

TAGS
build*
gh-pages
28 changes: 28 additions & 0 deletions etc/deploy-doc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash
set -e

if ! [[ -d "gh-pages" ]] ; then
echo -e "Error, the \"gh-pages\" directory is not present:"
echo -e "git clone --branch=gh-pages [email protected]:libsemigroups/hpcombi.git gh-pages"
exit 1
fi

printf "\033[0;32mDeploying updates to GitHub...\033[0m\n"

mkdir -p build
cd build
if [[ -f Makefile ]] ; then
make clean
fi
cmake ..
make doc
cd ..
cp -r build/doc/html/* gh-pages
cd gh-pages
git add .
msg="rebuilding site $(date)"
if [ -n "$*" ]; then
msg="$*"
fi
git commit -m "$msg"
# git push origin gh-pages

0 comments on commit 2e76ebc

Please sign in to comment.