Browse Source

TESTING

master
zeus 3 years ago
parent
commit
6afef3e00e
  1. 34
      README.md
  2. 2
      build-local.sh
  3. 2
      docs/site-local.yml
  4. 15
      push.sh

34
README.md

@ -1,6 +1,6 @@
# swarmlab docs
run
## build from git
> git clone https://git.swarmlab.io:3000/docs/docs
> cd docs
@ -8,6 +8,32 @@ run
>
>
build
## deploy
copy docs/build/site
## Work senario
1. Edit docs antora.yml (This is the main file)
2. Edit modules/*
3.You can use a local build first to try out your changes
>
> ./build-local.sh
>
4. Preview the results using your browser
>
> http://172.17.0.2:8080 # ip may be dieferent
>
5. When you are satisfied with result push them to original the git repository
>
> push.sh ["push comment"]
>
copy docs/build/site
You HAVE to use a string litterall otherwise git will only register the first word!

2
build-local.sh

@ -1 +1 @@
docker run -ti -v $PWD/docs:/antora hub.swarmlab.io:5480/antora /bin/sh -c "build-local.sh"
docker run -ti -v $PWD/docs:/antora -v $PWD:/doc-repo hub.swarmlab.io:5480/antora /bin/sh -c "build-local.sh"

2
docs/site-local.yml

@ -4,7 +4,7 @@ site:
start_page: swarmlab::index.adoc
content:
sources:
- url: /tmp/docs/docs.git
- url: /doc-repo
branches: master
start_path: docs
ui:

15
push.sh

@ -0,0 +1,15 @@
#!/bin/sh
if [ ! -z $1 ]; then
comment=$1
git add .
git commit -m"$comment"
git push origin
else
echo ""
echo "Whe need a comment for the curent push"
echo ""
echo "usage: ./push.sh \"comment here\" "
fi
Loading…
Cancel
Save