# Gh-pages will not refresh after CircleCI build and deploy

**URL:** <https://discuss.circleci.com/t/gh-pages-will-not-refresh-after-circleci-build-and-deploy/13723>\
**Category:** Deployments\
**Tags:** codedeploy, deployment\
**Created:** [June 25, 2017, 12:27pm UTC](https://discuss.circleci.com/t/gh-pages-will-not-refresh-after-circleci-build-and-deploy/13723 "2017-06-25T12:27:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![RothNRK](https://avatars.discourse-cdn.com/v4/letter/r/b5ac83/32.png) [@RothNRK](https://discuss.circleci.com/u/RothNRK)\
**Post date:** [June 25, 2017, 12:27pm UTC](https://discuss.circleci.com/t/gh-pages-will-not-refresh-after-circleci-build-and-deploy/13723/1 "2017-06-25T12:27:49Z")

</div>

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

1. Make changes locally.
2. ./deploy\_docs.sh
3. Verify changes \<- They appear
4. Make changes, push to github, have CircleCI run test
5. CircleCI runs ./deploy\_docs.sh
6. 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?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:41am UTC](https://discuss.circleci.com/t/gh-pages-will-not-refresh-after-circleci-build-and-deploy/13723/2 "2018-06-18T11:41:19Z")

</div>


