Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (39 sloc) 2.54 KB
sudo: required
# huge thanks to http://mgreau.com/posts/2016/03/28/asciidoc-to-gh-pages-with-travis-ci-docker-asciidoctor.html
services:
- docker
before_install:
- mkdir -p output
- docker pull heckj/docker-asciidoctor
# using instead of asciidoctor/docker-asciidoctor because I added rugged to support git metadata
stages:
- render
- name: deploy
if: branch = master AND type NOT IN (pull_request)
jobs:
include:
- stage: render
script:
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html heckj/docker-asciidoctor asciidoctor -v -t -D /documents/output -r ./docs/lib/google-analytics-docinfoprocessor.rb -r ./docs/lib/git-metadata-preprocessor/extension.rb docs/using-combine-book.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf heckj/docker-asciidoctor asciidoctor-pdf -v -t -D /documents/output docs/using-combine-book.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-epub3 heckj/docker-asciidoctor asciidoctor-epub3 -v -t -D /documents/output docs/using-combine-book.adoc
- stage: deploy
script:
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html heckj/docker-asciidoctor asciidoctor -v -t -D /documents/output -r ./docs/lib/google-analytics-docinfoprocessor.rb -r ./docs/lib/git-metadata-preprocessor/extension.rb docs/using-combine-book.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-html-2 heckj/docker-asciidoctor asciidoctor -v -t -D /documents/output -r ./docs/lib/google-analytics-docinfoprocessor.rb -r ./docs/lib/git-metadata-preprocessor/extension.rb docs/feedback.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-pdf heckj/docker-asciidoctor asciidoctor-pdf -v -t -D /documents/output docs/using-combine-book.adoc
- docker run -v $TRAVIS_BUILD_DIR:/documents/ --name asciidoc-to-epub3 heckj/docker-asciidoctor asciidoctor-epub3 -v -t -D /documents/output docs/using-combine-book.adoc
- cd output ; mv using-combine-book.html index.html ; cp -R ../docs/images images
- git init
- git config user.name "${GH_USER_NAME}"
- git config user.email "{GH_USER_EMAIL}"
- git add . ; git commit -m "Deploying to GitHub Pages"
- git push --force "https://${GH_TOKEN}@github.com/heckj/swiftui-notes.git" master:gh-pages
after_error:
- docker logs asciidoc-to-html
- docker logs asciidoc-to-pdf
- docker logs asciidoc-to-epub3
after_failure:
- docker logs asciidoc-to-html
- docker logs asciidoc-to-pdf
- docker logs asciidoc-to-epub3
You can’t perform that action at this time.