mirror of
https://github.com/ShadowNinja/LuaIRC.git
synced 2025-01-10 10:00:28 +01:00
Add Travis CI for automatic luadoc deployment
This commit is contained in:
parent
d388c89c1e
commit
455e27a7dc
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
/gh-pages/
|
14
.travis.yml
Normal file
14
.travis.yml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
language: lua
|
||||||
|
|
||||||
|
notifications:
|
||||||
|
email: false
|
||||||
|
|
||||||
|
env:
|
||||||
|
global:
|
||||||
|
- secure: "kFhU+DZjhq/KbDt0DIDWnlskXMa12miNelmhhy30fQGgVIdiibDGKMNGyLahWp8CnPu1DARb5AZWK2TDfARdnURT2pgcsG83M7bYIY6cR647BWjL7oAhJ6CYEzTWJTBjeUjpN/o4vIgfXSDR0c7vboDi7Xz8ilfrBujPL2Oi/og="
|
||||||
|
|
||||||
|
install:
|
||||||
|
- sudo apt-get -y install lua5.1 lua-doc
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./push-luadoc.sh
|
19
push-luadoc.sh
Normal file
19
push-luadoc.sh
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$TRAVIS_REPO_SLUG" == "JakobOvrum/LuaIRC" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||||
|
|
||||||
|
echo -e "Generating luadoc...\n"
|
||||||
|
|
||||||
|
git config --global user.email "travis@travis-ci.org"
|
||||||
|
git config --global user.name "travis-ci"
|
||||||
|
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG} gh-pages > /dev/null
|
||||||
|
|
||||||
|
cd gh-pages
|
||||||
|
git rm -rf ./doc
|
||||||
|
sh ./generate.sh
|
||||||
|
git add -f ./doc
|
||||||
|
git commit -m "Lastest documentation on successful travis build $TRAVIS_BUILD_NUMBER auto-pushed to gh-pages"
|
||||||
|
git push -fq origin gh-pages > /dev/null
|
||||||
|
|
||||||
|
echo -e "Published luadoc to gh-pages.\n"
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user