Commit 84aa863b authored by Fabrice Salvaire's avatar Fabrice Salvaire

added ghpages

parent ee16292e
This branch contains the GitHub Pages for PythonicGCodeMachine.
These pages are generated by the documentation tool.
.buildinfo
.git
.gitignore
README.rst
push-to-github.sh
html-rsync-filter.txt
update.sh
#! /bin/bash
####################################################################################################
root_dir=$(dirname $(dirname $(realpath $0)))
html_build="${root_dir}/doc/sphinx/build/html"
source_gh_pages=${root_dir}/gh-pages
echo Source Path: ${root_dir}
echo HTML Build Path: ${html_build}
origin='git@github.com:FabriceSalvaire/PythonicGCodeMachine.git'
####################################################################################################
tmp_dir=$(mktemp -d)
if [ -e ${tmp_dir} ]; then
pushd ${tmp_dir}
# To create gh-pages branch
# git clone ${origin} PythonicGCodeMachine-gh-pages
# pushd PythonicGCodeMachine-gh-pages
# git checkout --orphan gh-pages
# git rm --cached -r .
git clone ${origin} PythonicGCodeMachine-gh-pages --branch gh-pages --single-branch
pushd PythonicGCodeMachine-gh-pages
# sync with origin if already cloned
# git fetch origin
git checkout gh-pages
rm -rf static images
rsync --delete -av --exclude-from=${source_gh_pages}/html-rsync-filter.txt ${html_build}/ .
cp ${source_gh_pages}/README.rst .
if [ -e _images ]; then
mv _images images
find . -name "*.html" -exec sed -e 's/_images/images/g;' -i {} \;
fi
if [ -e _static ]; then
mv _static static
find . -name "*.html" -exec sed -e 's/_static/static/g;' -i {} \;
fi
if [ -e _downloads ]; then
mv _downloads downloads
find . -name "*.html" -exec sed -e 's/_downloads/downloads/g;' -i {} \;
fi
find . -name '.#*html' -exec rm {} \;
git add --all *
git commit -m 'update'
git push -u origin gh-pages
popd -1 ; popd
rm -rf ${tmp_dir}
fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment