mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-11-11 16:53:57 +01:00
Add the publishing script so we can publish the docs to github pages on the enterprise server
This commit is contained in:
1 parent
e80bf05f25
commit
5b521da557
1 file changed
+34
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# switch branches and make sure we've got the latest version
|
||||
git checkout gh-pages
|
||||
git pull origin gh-pages
|
||||
|
||||
# go to master for the latest docs from master
|
||||
git checkout master
|
||||
git pull origin master
|
||||
|
||||
# build the docs
|
||||
make clean
|
||||
make html
|
||||
cd ..
|
||||
|
||||
# switch back to gh-pages
|
||||
git checkout gh-pages
|
||||
|
||||
# delete everything non-relevant and extract docs
|
||||
ls | grep -v docs | xargs rm -r
|
||||
touch .nojekyll
|
||||
mv ./docs/build/html/* ./
|
||||
rm -rf ./docs
|
||||
|
||||
# And commit to publish
|
||||
git add -A
|
||||
git commit -m "publishing updated docs..."
|
||||
git push origin gh-pages
|
||||
|
||||
# switch back to master
|
||||
git checkout master
|
||||
|
||||
# go back to docs dir
|
||||
cd docs
|
||||
Reference in new issue
Block a user