-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from nielsenramon/nr-circle
Add circle configs
- Loading branch information
Showing
20 changed files
with
221 additions
and
110 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
machine: | ||
ruby: | ||
version: 2.2.3 | ||
|
||
dependencies: | ||
pre: | ||
- gem build kickster.gemspec | ||
- gem install kickster | ||
|
||
test: | ||
override: | ||
- kickster new test | ||
- ls -al | ||
- cd test && bin/setup | ||
- cd test && bundle exec jekyll build | ||
- cd test && bundle exec htmlproof ./_site --only-4xx --href-ignore "#" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Kickster | ||
VERSION = "1.0.4" | ||
VERSION = "1.1.0" | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
|
||
# Automated deploy script with Circle CI. | ||
|
||
# Exit if any subcommand fails. | ||
set -e | ||
|
||
# Variables | ||
ORIGIN_URL=`git config --get remote.origin.url` | ||
|
||
echo "Started deploying" | ||
|
||
# Checkout gh-pages branch. | ||
if [ `git branch | grep gh-pages` ] | ||
then | ||
git branch -D gh-pages | ||
fi | ||
git checkout -b gh-pages | ||
|
||
# Build site. | ||
bower install | ||
bundle exec jekyll build | ||
|
||
# Delete and move files. | ||
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \; | ||
mv _site/* . | ||
rm -R _site/ | ||
|
||
# Push to gh-pages. | ||
git config user.name "$USER_NAME" | ||
git config user.email "$USER_EMAIL" | ||
|
||
git add -fA | ||
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]" | ||
git push -f $ORIGIN_URL gh-pages | ||
|
||
# Move back to previous branch. | ||
git checkout - | ||
bower install | ||
|
||
echo "Deployed Successfully!" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
machine: | ||
environment: | ||
USER_NAME: <your-github-username> | ||
USER_EMAIL: <your-github-email> | ||
ruby: | ||
version: 2.2.3 | ||
|
||
dependencies: | ||
pre: | ||
- ./bin/setup | ||
|
||
test: | ||
post: | ||
- bundle exec jekyll build | ||
- bundle exec htmlproof ./_site --only-4xx --href-ignore "#" | ||
|
||
deployment: | ||
production: | ||
branch: master | ||
commands: | ||
- ./bin/automated |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
Automated deploy with Travis CI | ||
=============================== | ||
|
||
Kickster can also work with [Travis CI](https://travis-ci.org/), follow the steps below to set it up. | ||
|
||
## Automated deployment with TravisCI | ||
|
||
Automated deployment is by default not included in your Kickster generated Jekyll project. Please follow the steps below to include automated deployment with travis. | ||
|
||
*Note that changes will only deploy when your code is merged into master.* | ||
|
||
#### 1. Copy the required automated deploy script | ||
|
||
Copy the [automated](https://github.com/nielsenramon/kickster/blob/master/snippets/travis/automated) script inside the `/bin` folder of your project (check if the file has execute permissions!). | ||
|
||
#### 2. Add `.travis.yml` | ||
|
||
Copy the `.travis.yml` from the [snippets](https://github.com/nielsenramon/kickster/blob/master/snippets/travis/.travis.yml) folder inside the `/bin` folder of your project(check if the file has execute permissions!). | ||
|
||
And adjust the following 2 lines with your information: | ||
|
||
- USERNAME: <your-github-username> | ||
- EMAIL: <your-github-email> | ||
|
||
#### 3. Create a personal access token | ||
|
||
This is required to push to the GitHub repo from a script. | ||
|
||
In GitHub go to `settings > Personal access tokens` and create a new one. | ||
First give it a proper name so it is easy to recognize later. Then check `repo` (check `public_repo` if it is a public repository) and click on create. | ||
|
||
<img src="https://dl.dropboxusercontent.com/u/20823269/kickster-token.png" alt="Screenshot of token generation in GitHub"> | ||
|
||
Copy the generated token. | ||
|
||
*Don't forget to enable your repository in [Travis CI](https://travis-ci.org/)* | ||
|
||
Go back to your project in terminal and input the following: | ||
|
||
gem install travis | ||
travis encrypt GITHUB_TOKEN=secret-token-from-github --add | ||
|
||
This added a line inside your `.travis.yml' file like this: | ||
|
||
secure: <encrypted token> | ||
|
||
That's it, enjoy your automated deployments from now on! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
|
||
# Automated deploy script with Travis CI. | ||
|
||
# Exit if any subcommand fails. | ||
set -e | ||
|
||
# Variables | ||
ORIGIN_URL=`git config --get remote.origin.url` | ||
ORIGIN_CREDENTIALS=${ORIGIN_URL/\/\/github.com/\/\/$GITHUB_TOKEN@github.com} | ||
COMMIT_MESSAGE=$(git log -1 --pretty=%B) | ||
|
||
echo "Started deploying" | ||
|
||
# Checkout gh-pages branch. | ||
if [ `git branch | grep gh-pages` ] | ||
then | ||
git branch -D gh-pages | ||
fi | ||
git checkout -b gh-pages | ||
|
||
# Build site. | ||
bower install | ||
bundle exec jekyll build | ||
|
||
# Delete and move files. | ||
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \; | ||
mv _site/* . | ||
rm -R _site/ | ||
|
||
# Push to gh-pages. | ||
git config user.name "$USERNAME" | ||
git config user.email "$EMAIL" | ||
|
||
git add -fA | ||
git commit --allow-empty -m "$COMMIT_MESSAGE [ci skip]" | ||
git push -f -q $ORIGIN_CREDENTIALS gh-pages | ||
|
||
# Move back to previous branch. | ||
git checkout - | ||
bower install | ||
|
||
echo "Deployed Successfully!" | ||
|
||
exit 0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
source "https://rubygems.org" | ||
|
||
gem "autoprefixer-rails", "~> 6.1.0.1" | ||
gem "autoprefixer-rails", "~> 6.1.1" | ||
gem "html-proofer", "~> 2.5.2" | ||
gem "jekyll", "~> 3.0.1" | ||
gem "jekyll-assets", "~> 2.0.2" | ||
gem "jekyll-assets", "~> 2.0.3" | ||
gem "jekyll-sitemap", "~> 0.9.0" | ||
gem "sass", "~> 3.4.19" | ||
gem "uglifier", "~> 2.7.2" |
Empty file.
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ exclude: | |
- .travis.yml | ||
- bin/* | ||
- bower.json | ||
- circle.yml | ||
- Gemfile | ||
- Gemfile.lock | ||
- README.md | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.