#!/bin/bash

cd /var/services/usky-dev-doc

docker ps -a | grep usky-book

docker rm -f usky-book

sleep 5

git pull

sleep 10

sudo book sm

sudo gitbook init
sudo gitbook build

docker run --name usky-book -p 4000:4000 -v /var/services/usky-dev-doc/:/srv/gitbook -v /var/services/usky-dev-doc/.html:/srv/html --restart=always -d fellah/gitbook

sleep 5

docker ps -a | grep usky-book

docker logs usky-book
