mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Test docs before deploying (#7992)
* Test docs before deploying fix issue with docs * Actually check the result of the doc build add error for testing * Fix up docs * use original logic * only deploy docs if build succeeds. Make pip quiet
This commit is contained in:
parent
0652d7cc61
commit
5c5de59f8e
@ -6,7 +6,6 @@ matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 7.1
|
||||
env: EXECUTE_BUILD_SCHEMA=true
|
||||
- php: 7.0
|
||||
env: SKIP_STYLE_CHECK=1
|
||||
- php: 5.3
|
||||
@ -43,10 +42,6 @@ install:
|
||||
- pip install --user pylint
|
||||
- pip install --user mysql-python
|
||||
|
||||
after_success:
|
||||
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $EXECUTE_BUILD_SCHEMA == "true" && bash scripts/deploy-schema.sh
|
||||
- test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && test $EXECUTE_BUILD_DOCS == "true" && bash scripts/deploy-docs.sh
|
||||
|
||||
after_failure:
|
||||
- cat /tmp/snmpsimd.log
|
||||
|
||||
@ -55,4 +50,5 @@ script:
|
||||
- php scripts/pre-commit.php -s
|
||||
- SNMPSIM=1 DBTEST=1 vendor/bin/phpunit --stop-on-failure
|
||||
- bash -n daily.sh
|
||||
- pylint -E poller-wrapper.py discovery-wrapper.py
|
||||
- pylint -E poller-wrapper.py discovery-wrapper.py
|
||||
- bash scripts/deploy-docs.sh
|
||||
|
@ -147,8 +147,9 @@ pages:
|
||||
- 11. Misc:
|
||||
- Security information: General/Security.md
|
||||
- CLI Scripts: Support/CLI-Tools.md
|
||||
- Device Notes: Support/Device-Notes.md
|
||||
- Support/Devices/Carel-pCOweb-Devices.md
|
||||
- Device Notes:
|
||||
- Intro: Support/Device-Notes/index.md
|
||||
- Carel pCOweb: Support/Device-Notes/Carel-pCOweb-Devices.md
|
||||
- hidden:
|
||||
- API/API-Docs.md
|
||||
- Installation/Installing-LibreNMS.md
|
||||
|
@ -3,10 +3,15 @@ GH_REPO="@github.com/librenms-docs/librenms-docs.github.io.git"
|
||||
FULL_REPO="https://${GH_TOKEN}$GH_REPO"
|
||||
THEME_REPO="https://github.com/librenms-docs/theme_v2.git"
|
||||
|
||||
pip install --user 'jinja2<2.9'
|
||||
pip install --user mkdocs
|
||||
pip install --user pymdown-extensions
|
||||
pip install --user git+git://github.com/aleray/mdx_del_ins.git
|
||||
if [ "$EXECUTE_BUILD_DOCS" != "true" ]; then
|
||||
echo "Doc build skipped"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
pip install --user --quiet 'jinja2<2.9'
|
||||
pip install --user --quiet mkdocs
|
||||
pip install --user --quiet pymdown-extensions
|
||||
pip install --user --quiet git+git://github.com/aleray/mdx_del_ins.git
|
||||
|
||||
mkdir -p out
|
||||
|
||||
@ -24,10 +29,16 @@ cd ../
|
||||
git clone $THEME_REPO
|
||||
|
||||
mkdocs build --clean
|
||||
build_result=$?
|
||||
|
||||
cd out
|
||||
# Only deploy after merging to master
|
||||
if [ "$build_result" == "0" -a "$TRAVIS_PULL_REQUEST" == "false" -a "$TRAVIS_BRANCH" == "master" ]; then
|
||||
cd out
|
||||
|
||||
touch .
|
||||
git add -A .
|
||||
git commit -m "GH-Pages update by travis after $TRAVIS_COMMIT"
|
||||
git push -q origin master
|
||||
touch .
|
||||
git add -A .
|
||||
git commit -m "GH-Pages update by travis after $TRAVIS_COMMIT"
|
||||
git push -q origin master
|
||||
else
|
||||
exit ${build_result} # return doc build result
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user