Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
54 additions
and
16 deletions.
There are no files selected for viewing
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,13 @@ | ||
FROM apiaryio/jekyll | ||
MAINTAINER Apiary SRE Team <sre@apiary.io> | ||
|
||
ENV REFRESHED_AT 2016-10-14 | ||
|
||
ADD ./Gemfile /srv/jekyll/Gemfile | ||
ADD ./Gemfile.lock /srv/jekyll/Gemfile.lock | ||
|
||
WORKDIR /srv/jekyll | ||
RUN chown -R jekyll /srv/jekyll | ||
RUN bundle | ||
USER jekyll | ||
ENV LC_ALL C.UTF-8 |
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 |
---|---|---|
|
@@ -77,6 +77,3 @@ DEPENDENCIES | |
jekyll-sitemap | ||
rake | ||
rouge | ||
|
||
BUNDLED WITH | ||
1.12.5 |
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,16 +1,30 @@ | ||
machine: | ||
ruby: | ||
version: 2.3.1 | ||
test: | ||
services: | ||
- docker | ||
|
||
dependencies: | ||
cache_directories: | ||
- "~/docker" | ||
|
||
override: | ||
- sudo apt-get update | ||
- sudo apt-get install libcurl3-dev | ||
- bundle exec rake test | ||
- docker info; mkdir -p ~/docker | ||
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi | ||
- ./docker/build.sh | ||
- docker save apiaryio/blog > ~/docker/image.tar | ||
|
||
deployment: | ||
production: | ||
branch: master | ||
commands: | ||
- git config --global user.name "Apiary Bot" | ||
- git config --global user.email "support@apiary.io" | ||
- git remote set-url origin "https://${GH_TOKEN}@github.com/apiaryio/apiaryio.github.com" | ||
- rake deploy | ||
- git remote set-url origin "https://${GH_TOKEN}@github.com/apiaryio/blog" | ||
- docker run -e GH_TOKEN=$GH_TOKEN --volume=$(pwd):/srv/jekyll apiaryio/blog bash /srv/jekyll/deploy.sh | ||
test: | ||
override: | ||
- ./docker/run-tests.sh | ||
|
||
general: | ||
branches: | ||
ignore: | ||
- gh-pages |
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,5 @@ | ||
#!/bin/bash | ||
git config --global user.name "Apiary Bot" | ||
git config --global user.email "support@apiary.io" | ||
git remote set-url origin "https://${GH_TOKEN}@github.com/apiaryio/apiaryio.github.com" | ||
bundle exec rake deploy |
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,2 @@ | ||
#!/bin/bash | ||
docker build -t apiaryio/blog . |
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,2 @@ | ||
#!/bin/bash | ||
docker run --volume=$(pwd):/srv/jekyll apiaryio/blog bundle exec rake test |
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,5 @@ | ||
#!/bin/bash | ||
|
||
docker run --rm --volume=$(pwd):/srv/jekyll \ | ||
-it -p 4000:4000 apiaryio/blog \ | ||
jekyll serve -H 0.0.0.0 --watch --drafts --trace --force_polling |