File tree Expand file tree Collapse file tree 6 files changed +89
-19
lines changed Expand file tree Collapse file tree 6 files changed +89
-19
lines changed Original file line number Diff line number Diff line change
1
+ version : 2
2
+ jobs :
3
+ build :
4
+ docker :
5
+ - image : circleci/cci-demo-docker-primary:0.0.2
6
+
7
+ branches :
8
+ only :
9
+ - master
10
+
11
+ steps :
12
+ - checkout
13
+
14
+ - run :
15
+ name : Instalar cliente Docker
16
+ command : |
17
+ set -x
18
+ VER="17.03.0-ce"
19
+ curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
20
+ tar -xz -C /tmp -f /tmp/docker-$VER.tgz
21
+ mv /tmp/docker/* /usr/bin
22
+
23
+ - run :
24
+ name : Instalar Docker Compose
25
+ command : |
26
+ set -x
27
+ curl -L https://github.com/docker/compose/releases/download/1.11.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
28
+ chmod +x /usr/local/bin/docker-compose
29
+
30
+ - setup_remote_docker
31
+
32
+ - run :
33
+ name : Build container
34
+ command : |
35
+ set -x
36
+ docker-compose -f docker-circle.yaml up --build -d
37
+
38
+ - run :
39
+ name : Espere container está pronto
40
+ command : |
41
+ set -x
42
+ sleep 10
43
+
44
+ - run :
45
+ name : Monte GitHub Pages
46
+ command : |
47
+ set -x
48
+ ./build.sh
49
+
50
+ - run :
51
+ name : Deploy GitHub Pages
52
+ command : |
53
+ set -x
54
+ git clone -b gh-pages https://github.com/victorhundo/docs.git /opt/gh-pages
55
+ cp -rf ./_build/main/* /opt/gh-pages/
56
+ cd /opt/gh-pages && git add .
57
+ git -c user.name='CircleCI' -c user.email='travis' commit -m 'UPDATE GitHub Pages'
58
+ git push
59
+
60
+ - store_artifacts :
61
+ path : /tmp/test-results
62
+ destination : raw-test-output
63
+
64
+ - store_test_results :
65
+ path : /tmp/test-results
Original file line number Diff line number Diff line change
1
+ FROM projectatomic/ascii_binder
2
+
3
+ WORKDIR /docs
4
+
5
+ RUN curl -sSL https://rvm.io/mpapis.asc | gpg2 --import -
6
+ RUN curl -L https://get.rvm.io | bash -s stable
7
+
8
+ COPY . /docs
9
+ CMD ["bash" , "/docs/docker-entrypoint.sh" ]
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
- SITE_ROOT=$( echo " $( basename ` git rev-parse --show-toplevel ` ) \/" )
3
+ SITE_ROOT=$( echo " $CIRCLE_PROJECT_REPONAME \/" )
4
4
RED=' \033[0;31m'
5
5
GREEN=' \033[0;32m'
6
6
YELLOW=' \033[1;33m'
@@ -11,22 +11,8 @@ function replace {
11
11
find main -name ' *.css' -type f -exec sed -i " s/$1 /$2 /g" ' {}' \;
12
12
}
13
13
14
-
15
- if [ ! -d " ./_build/main" ]; then
16
- mkdir -p ./_build/main
17
- fi
18
-
19
- docker-compose down && docker-compose up --build -d > /dev/null
20
- # Wait Docker is Ready!
21
- docker logs -f docs-asciidoctor | while read line
22
- do
23
- if echo $line | grep -q ' Guard is now watching' ; then
24
- echo ' Server Started'
25
- LOG_PID=$( pgrep -f ' docker logs' )
26
- kill -9 $LOG_PID ;
27
- fi
28
- echo $line
29
- done
14
+ docker cp docs-asciidoctor:/docs/_preview .
15
+ mkdir -p ./_build/main
30
16
31
17
rm -rf ./_build/*
32
18
cp -r ./_preview/main ./_build/
@@ -47,7 +33,6 @@ replace "_images" "imgs"
47
33
cd - > /dev/null
48
34
49
35
cp -r ./_build /tmp
50
- git checkout gh-pages 2> /dev/null
51
36
if [ $? -eq 0 ]; then
52
37
cp -rf /tmp/_build/main/* . && rm -rf /tmp/_build
53
38
printf " ${GREEN} BUILD DONE!\n${RESET_COLOR} "
Original file line number Diff line number Diff line change
1
+ version : ' 2'
2
+ services :
3
+ docs :
4
+ build : .
5
+ container_name : docs-asciidoctor
6
+ image : circle-docs
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ cd /docs
4
+ asciibinder clean && asciibinder build
5
+ tail -f /dev/null
Original file line number Diff line number Diff line change 1
1
[[welcome-index]]
2
- = {product-title} Documentação {product-version}
2
+ = {product-title} Documentação Teste de modificação {product-version}
3
3
{product-author}
4
4
{product-version}
5
5
:data-uri:
You can’t perform that action at this time.
0 commit comments