Skip to content

Commit a792eb6

Browse files
authored
Merge pull request #294 from Cadair/test-gh-pages
Test gh pages
2 parents 2284940 + 47cc3f2 commit a792eb6

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ jobs:
5050
DOCS_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/build/html/index.html"; echo $DOCS_URL
5151
5252
- run:
53-
name: Push to RTD branch
53+
name: Push to gh-pages branch
5454
command: |
55-
bash .circleci/rtd-push.sh
55+
bash .circleci/gh-pages-push.sh
5656
5757
# - save_cache: # Specify what paths to cache
5858
# key: sample-data-v1

.circleci/gh-pages-push.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash -eux
2+
3+
# if [ -z "${GIT_USER_NAME}" ]; then
4+
# echo "Please set an env var GIT_USER_NAME"
5+
# exit 1
6+
# fi
7+
#
8+
# if [ -z "${GIT_USER_EMAIL}" ]; then
9+
# echo "Please set an env var GIT_USER_EMAIL"
10+
# exit 1
11+
# fi
12+
13+
if [[ -z $CIRCLE_PULL_REQUEST ]] ; then
14+
git clone --single-branch -b gh-pages [email protected]:astropy/astropy-tutorials.git gh-pages
15+
cp -r build/html/* gh-pages
16+
cd gh-pages
17+
git add .
18+
git status
19+
git -c user.name='circle' -c user.email='circle' commit -m "Upadate the build docs"
20+
git status
21+
git push -q origin gh-pages
22+
echo "Not a pull request: pushing RST files to rst branch."
23+
else
24+
echo $CIRCLE_PULL_REQUEST
25+
echo "This is a pull request: not pushing RST files."
26+
fi

0 commit comments

Comments
 (0)