mirror of
https://github.com/cdtools-developers/cdtools.git
synced 2026-09-09 13:02:41 +02:00
35 lines
634 B
Bash
Executable File
35 lines
634 B
Bash
Executable File
#!/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
|