I have a python package with documentation built by sphinx, and a gh-pages branch setup for github pages. I have a script that when run locally will publish my changes without issue. At the end of a CircleCI test cycle the script runs without errors but the changes will not show in the actual page. The changes are however shown in index.html of the gh-pages branch.
Recap
- Make changes locally.
- ./deploy_docs.sh
- Verify changes <- They appear
- Make changes, push to github, have CircleCI run test
- CircleCI runs ./deploy_docs.sh
- index.html on gh-branch reflects changes. Website does not host new index.html
My deploy script:
#!/bin/sh
set -e
git checkout gh-pages
git pull --unshallow origin gh-pages
git reset --hard origin/$CIRCLE_BRANCH
sphinx-apidoc -o docs/source dslib
sphinx-build docs/source .
git add -A
git commit -m "Deploy to GitHub pages $CIRCLE_SHA1 [ci skip]"
git push -f origin gh-pages
Why are the gh-pages not being updated after being pushed to gh-pages from CircleCI?