mirror of
https://github.com/seigler/dash-website
synced 2025-07-26 06:46:10 +00:00
build site using docker
This commit is contained in:
parent
250439df3b
commit
b1d128a7c9
1 changed files with 17 additions and 4 deletions
21
cibuild.sh
21
cibuild.sh
|
@ -1,5 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e # halt script on error
|
||||
#! /bin/bash
|
||||
|
||||
npm run build
|
||||
#bundle exec htmlproofer ./_site --disable-external --allow-hash-href --assume-extension --alt-ignore '/.*/' --file-ignore /assets/,/dist/,/style-guide/,/blog/ --url-ignore '/^\/binaries\/.+$/,/^\/forum\/?.*$/'
|
||||
# halt script on error, echo commands/output
|
||||
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