Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug that causes non-master builds to erase master docs #256

Merged
merged 4 commits into from
May 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ jobs:
- "./scripts/stagepages.sh"
deploy:
provider: pages
skip-cleanup: true
skip_cleanup: true
keep_history: true
github-token: $GITHUB_TOKEN
on:
all_branches: true
Expand Down
10 changes: 0 additions & 10 deletions scripts/fetchpages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@ rm -rf .ghpages-tmp
mkdir -p .ghpages-tmp
cd .ghpages-tmp
git clone --depth=1 --branch=gh-pages $REPO_URL .
if [ "$TRAVIS_BRANCH" == "master" ]; then
cp -Rn . ../
else
# in case it doesn't exist
mkdir -p preview
mkdir -p docs
mkdir -p swagger-ui
cp -Rn preview ../preview/
cp -Rn docs ../docs/
cp -Rn swagger-ui ../swagger-ui/
fi
cd ..
rm -rf .ghpages-tmp
4 changes: 3 additions & 1 deletion scripts/stagepages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -v

if [ "$TRAVIS_BRANCH" != "gh-pages" ]; then
if [ "$TRAVIS_BRANCH" == "master" ]; then
branchpath = "."
branchpath="."
else
branch=$(echo "$TRAVIS_BRANCH" | awk '{print tolower($0)}')
branchpath="preview/$branch"
Expand All @@ -20,3 +20,5 @@ fi

# do some cleanup, these cause the gh-pages deploy to break
rm -rf node_modules
rm -rf web_deploy
rm -rf spec