lets try this

main
Evan Hemsley 2019-09-15 12:49:31 -07:00
parent c61af5d123
commit 017ba4c764
1 changed files with 5 additions and 5 deletions

View File

@ -7,8 +7,8 @@ jobs:
environment: environment:
BRANCH: master BRANCH: master
TARGET_REPO: moontools-docs/moontools-docs.github.io.git TARGET_REPO: moontools-docs/moontools-docs.github.io.git
DOCS_CHECKOUT_DIR: ~/build DOCS_CHECKOUT_DIR: ~/docs
HUGO_BUILD_DIR: ~/build/bonk HUGO_BUILD_DIR: ~/build
steps: steps:
- checkout - checkout
- run: - run:
@ -26,12 +26,12 @@ jobs:
git config --global user.name "CircleCI" git config --global user.name "CircleCI"
#using token clone gh-pages branch #using token clone gh-pages branch
git clone --quiet --branch=$CIRCLE_BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO $DOCS_CHECKOUT_DIR > /dev/null git clone --quiet --branch=$CIRCLE_BRANCH https://${GH_TOKEN}@github.com/$TARGET_REPO $DOCS_CHECKOUT_DIR > /dev/null
#go into directory and copy data we're interested in to that directory #rsync
cd $HUGO_BUILD_DIR
echo "rsync built code with checked out code..." echo "rsync built code with checked out code..."
rsync -r --exclude=.git --delete ~/project/public $HUGO_BUILD_DIR rsync -a --exclude=.git --delete $HUGO_BUILD_DIR/ $DOCS_CHECKOUT_DIR/bonk
#add, commit and push files #add, commit and push files
echo "add files to git..." echo "add files to git..."
cd $DOCS_CHECKOUT_DIR
git add --all git add --all
echo "commit files to git repository..." echo "commit files to git repository..."
if git commit -m "CircleCI build $CIRCLE_BUILD_NUM pushed to Github Pages" ; then if git commit -m "CircleCI build $CIRCLE_BUILD_NUM pushed to Github Pages" ; then