Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
gdolle committed Apr 5, 2018
1 parent 15cf90e commit 48bd6cb
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
steps:
- name: ':jekyll: :book:'
command: .buildkite/steps/build.sh
- name: ':antora: :book:'
command: .buildkite/steps/antora-build.sh
agents:
docker: true
env:
PROJECT: book.mso4sc
PROJECT: book.mso4sc
BUILDKITE_DOCKER_COMPOSE_CONTAINER: "antora"
- wait
- name: ':rocket: :book:'
command: .buildkite/steps/deploy.sh
branches: master
command: .buildkite/steps/docs-deploy.sh
branches: feature/antora
env:
PROJECT: book.mso4sc
PROJECT: book.mso4sc
12 changes: 12 additions & 0 deletions .buildkite/steps/antora-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

set -eo pipefail
set -x

BRANCH=${BRANCH:-${BUILDKITE_BRANCH:master}}
echo "--- Building $PROJECT..."
antora --html-url-extension-style=indexify antora-github-mso4sc-doc.yml
ls -lrta

tar --exclude='*.png' --exclude="*.jpg" --exclude="*.jpeg" -c -z -f site.tar.gz build
buildkite-agent artifact upload site.tar.gz --job $BUILDKITE_JOB_ID
5 changes: 3 additions & 2 deletions .buildkite/steps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ set -x
BRANCH=${BRANCH:-${BUILDKITE_BRANCH:master}}

echo "--- Building $PROJECT..."
make install
make build
bundle config --local github.https true
bundle --path=.bundle/gems --binstubs=.bundle/.bin
bundle exec jekyll build
tar czf site.tar.gz _site/
buildkite-agent artifact upload site.tar.gz
2 changes: 1 addition & 1 deletion .buildkite/steps/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export WEBSERVER=es15.siteground.eu

echo "--- Deploying $PROJECT..."
buildkite-agent artifact download site.tar.gz . --build ${BUILDKITE_BUILD_ID}
rsync -avz _site/ $WEBSERVER:~/public_html/$PROJECT
rsync -avz _site/ $WEBSERVER:~/public_html/${PROJECT}
22 changes: 22 additions & 0 deletions .buildkite/steps/docs-deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -eo pipefail
set -x

BRANCH=${BRANCH:-${BUILDKITE_BRANCH:master}}
export WEBSERVER=es15.siteground.eu

echo "--- Deploying $PROJECT..."


buildkite-agent artifact download site.tar.gz . --build ${BUILDKITE_BUILD_ID}
tar xzf site.tar.gz

ls -l build
cd build/
export WEBSERVER=es15.siteground.eu

echo "--- Deploying $PROJECT..."
rsync -avz site/ $WEBSERVER:~/public_html/book.mso4sc

rm -rf build .antora-cache
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ _site
node_modules
package.json
package-lock.json
build

0 comments on commit 48bd6cb

Please sign in to comment.