Skip to content

Commit eddaf14

Browse files
committed
[.travis.yml, upload-doc.sh] upload doc to euslisp-docs
1 parent 8974aad commit eddaf14

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ notifications:
1212
env:
1313
- secure: "f5cLARB4jbydJ4AZVJ5LTgOIzOCCLd9cVgvM/jYU6Y3jPruv0z09jCIbcxSJfeFDxcw5AD6eUgI1UaA2gX3LOsL26rydNDRv2Hwesom3vOsov0SmNMNFKepxKnatDhNUNXtuEgxIJDWBfElPPIBAwKyQnF8laQbDH0tKfmOqGdM="
1414
before_install: # Use this to prepare the system to install prerequisites or dependencies
15+
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
1516
# Define some config vars
1617
- export CI_SOURCE_PATH=$(pwd)
1718
- export REPOSITORY_NAME=${PWD##*/}
@@ -51,5 +52,12 @@ after_success:
5152
- if [ "$TRAVIS_BRANCH" == "master" ]; then git add -f .; fi
5253
- if [ "$TRAVIS_BRANCH" == "master" ]; then git commit -m "Build documents from $TRAVIS_COMMIT" . ; fi
5354
- if [ "$TRAVIS_BRANCH" == "master" ]; then git push -f --quiet https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG.git gh-pages; fi
55+
# upload to euslisp-docs
56+
- if [ "$TRAVIS_BRANCH" == "master" ]; then git clone https://k-okada:$GH_TOKEN@github.com/jsk-ros-pkg/euslisp-docs.git /tmp/euslisp-docs; fi
57+
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd /tmp/euslisp-docs; git remote rm origin; git remote add origin https://k-okada:$GH_TOKEN@github.com/jsk-ros-pkg/euslisp-docs.git; fi
58+
- if [ "$TRAVIS_BRANCH" == "master" ]; then cd ${CI_SOURCE_PATH}/doc/latex; ${CI_SOURCE_PATH}/.upload-doc.sh; fi
59+
- if [ "$TRAVIS_BRANCH" == "master" ]; then mkdir -p /tmp/euslisp-docs/docs/euslisp; cd /tmp/euslisp-docs/docs/euslisp; cp /tmp/html/*.{md,png} .; fi
60+
- if [ "$TRAVIS_BRANCH" == "master" ]; then git add *.md; git commit -m "Update euslisp form https://github.com/$TRAVIS_REPO_SLUG/tree/$TRAVIS_COMMIT"; git push -fq origin master; fi
61+
5462

5563

.upload-doc.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
rm -fr /tmp/html
4+
mkdir -p /tmp/html
5+
latex2html -dir /tmp/html/ -local_icons -auto_prefix -iso_language JP manual -split 1 -no_navigation
6+
# euslisp-docs, generate markdown from pandoc
7+
sudo apt-get install -qq -y pandoc
8+
cd /tmp/html
9+
for file in manual*.html; do
10+
name=`basename $file .html`.md
11+
cp $file $file.tmp
12+
sed -i 's@<BR>@@' $file.tmp
13+
sed -i 's@ALIGN="CENTER"@@' $file.tmp
14+
pandoc -f html -t markdown -s $file.tmp -o $name
15+
sed -i 's@(\(.*\)\.html)@(\1)@g' $name
16+
rm $file.tmp
17+
done
18+
19+
# rm -fr /tmp/euslisp-docs/site
20+
# rm -fr /tmp/euslisp-docs/docs/euslisp/*
21+
# mkdir -p /tmp/euslisp-docs/docs/euslisp
22+
# mv *.md /tmp/euslisp-docs/docs/euslisp/
23+
# #cp *.png /tmp/euslisp-docs/docs/euslisp/
24+
# cd /tmp/euslisp-docs
25+
# git add docs/euslisp/*
26+
# git commit -m "Update euslisp form $TRAVIS_COMMIT"
27+
28+
29+
30+

0 commit comments

Comments
 (0)