-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathcode_docs.sh
More file actions
executable file
·29 lines (22 loc) · 807 Bytes
/
code_docs.sh
File metadata and controls
executable file
·29 lines (22 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
# clone gh-pages branch
git clone -b gh-pages https://github.com/stevenliuyi/lcs code_docs
# clear gh-pages branch
rm -rf code_docs/*
# generate documentation
doxygen docs/Doxyfile
# check if documentation generation is successed
if [ -d "docs/html" ] && [ -f "docs/html/index.html" ]; then
# move documentation files to gh-pages branch
mv docs/html/* code_docs/
cd code_docs
# configure git
git config user.name "stevenliuyi"
git config user.email "stevenliuyi@gmail.com"
# add documentations and push back to gh-pages
git add --all
git commit -m "Doxygen deployment - Travis build: ${TRAVIS_BUILD_NUMBER} Commit: ${TRAVIS_COMMIT}"
git push https://${GITHUB_TOKEN}@github.com/stevenliuyi/lcs gh-pages:gh-pages --force
else
exit 1
fi