-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Update and fix doc site deploy #137
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
machine: | ||
node: | ||
version: 4.2.1 | ||
ruby: | ||
version: 2.2.3 | ||
|
||
dependencies: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No more Ruby needed on our CI since we get our changelog by github changelog api now. :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
pre: | ||
- gem install github_changelog_generator | ||
- pip install awscli | ||
|
||
test: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No more waiting for this heavy gem install, thanks to the API. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 for improved speed. Once this app is Dockerized we'll be able to cache dependencies for breezy deployments, and eliminate the external build dependency. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,27 +9,19 @@ NPM_PACKAGE_VERSION=$(json -f package.json version) | |
git config --global user.name "tadeploy" | ||
git config --global user.email "devteam@technologyadvice.com" | ||
|
||
# | ||
# build | ||
# | ||
gulp docs | ||
|
||
# | ||
# generate changelog | ||
# | ||
echo "...generating changelog" | ||
github_changelog_generator $CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME | ||
curl -X POST github-changelog-api.herokuapp.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was going to ask if the default machines came with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had seen it used somewhere. Had to double check this one. Found it in their docs under configuration as a valid way to install phantom.js. Keep in mind the build passing here is only testing our components. The easiest way to test this deploy script, is to deploy it :) |
||
| json contents > CHANGELOG.md | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We post to the changelog api, grab the |
||
|
||
# | ||
# push to master and gh-pages | ||
# | ||
git add . | ||
git add CHANGELOG.md | ||
|
||
if [[ -n $(git status --porcelain) ]]; then | ||
echo "...starting push, repo is dirty after build" | ||
git commit -n -m "deploy commit by $CIRCLE_USERNAME [ci skip]" | ||
git push origin master | ||
git push -f origin master:gh-pages | ||
echo "...starting push, CHANGELOG.md is dirty after build" | ||
git commit -n -m "deploy CHANGELOG.md by $CIRCLE_USERNAME [ci skip]" | ||
git push origin $CIRCLE_BRANCH | ||
else | ||
echo "...skipping push, repo is clean after build" | ||
fi | ||
|
@@ -64,3 +56,21 @@ else | |
echo "...publishing" | ||
npm publish | ||
fi | ||
|
||
# | ||
# gh-pages | ||
# | ||
echo "...deploying gh-pages" | ||
git push -f $CIRCLE_BRANCH:gh-pages | ||
git checkout gh-pages | ||
gulp docs | ||
git add . | ||
git add -f docs/build | ||
|
||
if [[ -n $(git status --porcelain) ]]; then | ||
echo "...starting push, gh-pages is dirty after build" | ||
git commit -n -m "deploy gh-pages by $CIRCLE_USERNAME [ci skip]" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Rather than There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 updating |
||
git push origin gh-pages | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we don't There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The checked out gh-pages here is forced pushed from master on ln 64. So, the local copy is the latests remote copy. A rebuild should force push master to gh-pages then checkout gh-pages again. We'll see how it goes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added -f on gh-pages push for good measure, since I had to update the script for the ignored branch. |
||
else | ||
echo "...skipping push, gh-pages is clean after build" | ||
fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pulled the gh-pages bit into it's own block here. Haven't tested this yet (first deploy will). It is pretty straight forward.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaned up ignored Wercker cruft. Explicitly referenced the
docInfo.json
so it is cleaned up onnpm run clean
. This is the Stardust component info used to create the doc site.