gh-pages
branch ( except for ) is created, from which content is displayed.master
documentation repository, we store source files in the ReStructuredText format and configuration files along with the change history. In gh-pages
not only is the story devoid of meaning, so also logically this thread exists parallel to master
. I proceeded from such prerequisites by creating the following script. #!/bin/sh shopt -s extglob dotglob CURR_DIR="$(pwd)" TMP_DIR="$CURR_DIR"-gh-pages sh build.sh rm -rf "$TMP_DIR" cp -r . "$TMP_DIR" cd "$TMP_DIR" git branch -D gh-pages git checkout --orphan gh-pages rm -rf !(.git|.gitignore) cp -r "$CURR_DIR"/_build/html/* . touch .nojekyll echo "droidparts.org" > CNAME git add -A git commit -m "published" git push origin :gh-pages git push origin gh-pages rm -rf "$TMP_DIR"
gh-pages
, create it again. The --orphan
parameter --orphan
responsible for --orphan
branch without a parent committee. Those. without binding to master
, as required. Also clear the folder..nojekyll
so that GitHub Pages does not allow Jekyll to underlined folders.CNAME
file with a domain from which everything will be given. Naturally, you also need to configure the DNS .gh-pages
from the server, push it.Source: https://habr.com/ru/post/180213/
All Articles