mirror of
https://github.com/seigler/dash-website
synced 2025-07-27 07:16:10 +00:00
Merge pull request #348 from nmarley/OPS-33-docker-build
OPS-33 docker build
This commit is contained in:
commit
1e08b77336
2 changed files with 33 additions and 26 deletions
38
.travis.yml
38
.travis.yml
|
@ -1,29 +1,23 @@
|
||||||
language: node_js
|
sudo: required
|
||||||
node_js:
|
dist: trusty
|
||||||
- 4.5.0
|
language: python
|
||||||
before_script:
|
python:
|
||||||
- chmod +x ./cibuild.sh
|
- '3.6'
|
||||||
- ssh-keyscan -H -t rsa,dsa $hostname >> ~/.ssh/known_hosts
|
|
||||||
script: ./cibuild.sh
|
script:
|
||||||
env:
|
- bash cibuild.sh
|
||||||
global:
|
- test -d _site/ && test -s _site/index.html
|
||||||
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
|
|
||||||
- CXX=g++-4.8
|
before_deploy:
|
||||||
sudo: false
|
- ssh-keyscan -H -t rsa,dsa $hostname >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
ssh_known_hosts:
|
ssh_known_hosts:
|
||||||
- www-test.dash.org
|
- www-test.dash.org
|
||||||
- 146.185.153.42
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
|
||||||
- g++-4.8
|
|
||||||
before_install:
|
|
||||||
- rvm install 2.3.1
|
|
||||||
deploy:
|
deploy:
|
||||||
provider: script
|
provider: script
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
script: test $TRAVIS_TEST_RESULT = 0 && script/deploy-rsync.sh
|
script: bash script/deploy-rsync.sh
|
||||||
on:
|
on:
|
||||||
branch: master
|
branch: master
|
||||||
|
|
21
cibuild.sh
21
cibuild.sh
|
@ -1,5 +1,18 @@
|
||||||
#!/usr/bin/env bash
|
#! /bin/bash
|
||||||
set -e # halt script on error
|
|
||||||
|
|
||||||
npm run build
|
# halt script on error, echo commands/output
|
||||||
#bundle exec htmlproofer ./_site --disable-external --allow-hash-href --assume-extension --alt-ignore '/.*/' --file-ignore /assets/,/dist/,/style-guide/,/blog/ --url-ignore '/^\/binaries\/.+$/,/^\/forum\/?.*$/'
|
set -xe
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
SRC_ROOT="$DIR"
|
||||||
|
|
||||||
|
echo "[$SRC_ROOT]"
|
||||||
|
|
||||||
|
(cd $SRC_ROOT && \
|
||||||
|
docker build -t dash-website-build . && \
|
||||||
|
docker create --name dash-www dash-website-build && \
|
||||||
|
docker cp dash-www:/data/_site/ ./_site/ && \
|
||||||
|
docker rm dash-www && \
|
||||||
|
(cd _site && rm -fr README.md) && \
|
||||||
|
echo "Ok. Site built in ${SRC_ROOT}/_site/"
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue