-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
72 lines (63 loc) · 2.82 KB
/
.travis.yml
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
language: node_js
node_js:
- '5.11'
cache:
directories:
- node_modules
install:
- |
sudo pip install https://github.com/syrusakbary/promise/archive/master.zip --upgrade
sudo pip install "graphene>=1.0.dev"
npm install
script:
- |
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = false ]; then
echo "Building the web."
GH_PAGES_DIR="$TRAVIS_BUILD_DIR"/public
GH_DOCS_DIR="$TRAVIS_BUILD_DIR"/docs
git config --global user.name "Travis CI"
git config --global user.email "[email protected]"
git clone --branch gh-pages --depth=50 \
https://[email protected]/graphql-python/graphene-python.org.git \
$GH_PAGES_DIR
git clone --branch docs --depth=50 \
https://[email protected]/graphql-python/graphene-python.org.git \
$GH_DOCS_DIR
./playground/graphene-js/build.sh
npm run build
cd $GH_PAGES_DIR
git status
git add --intent-to-add .
if ! git diff-index --quiet HEAD --; then
git add -A .
git commit -m "Rebuild website"
git push "https://${GITHUB_TOKEN}@github.com/graphql-python/graphene-python.org.git" gh-pages
fi
echo "Building docs."
DOCS_PACKAGE_DIR="$GH_DOCS_DIR"/sphinx_graphene_theme/
DOCS_PACKAGE_STATIC="$DOCS_PACKAGE_DIR"/static/
# Updating template docs
cp app.css $DOCS_PACKAGE_STATIC
cp bundle.js $DOCS_PACKAGE_STATIC
cp bundle.js.map $DOCS_PACKAGE_STATIC
cd $GH_DOCS_DIR
git status
git add --intent-to-add .
if ! git diff-index --quiet HEAD --; then
cd $DOCS_PACKAGE_DIR
# This updates the version
sed -r 's/(.*)(__version__\s*=\s*'\''[0-9]\.)([0-9]+)(.*)/echo "\1\2$((\3+1))\4"/ge' __init__.py
cd $GH_DOCS_DIR
git add -A .
git commit -m "Rebuild docs"
git push "https://${GITHUB_TOKEN}@github.com/graphql-python/graphene-python.org.git" docs
fi
curl -X POST http://readthedocs.org/build/graphene-python
curl -X POST http://readthedocs.org/build/graphene-django
curl -X POST http://readthedocs.org/build/graphene-sqlalchemy
curl -X POST http://readthedocs.org/build/graphene-gae
exit
fi
env:
global:
secure: BWdro/wz7F4tUiFVmDcjVDvNHO2rEqWoPWQ1haFqR/eBbuc0EnSRXil9T2gdgwg9UILwphKAy0O8dnxIXcRp9d3c5nnqFeB0ig1gZNu00NBbSWxJHKx94N3JFbev2H+ndmung8D0o/bxubE3yjihGgIL1RlS/2OV5DHLFSf40CjcGpuAfwvJFy4c+FcG/nOBbhBa4iBn05g8T/TfKfOwBem2fNpaxzWTu9E4BNmXEscq6DDdSfzL5IQdF3HXxxX18aDU4C/ugwrBjltNsITFTnaQVN1nzYS8tFjTGAER/kXv+AhV1saO247P6X5a715iTyFbZIuctY8clw7H1wvODLzPAe7SgNVUBGR+xspkOvYMQR3pPbee5VS/3icNZZlm4hQ5vPrpyKURKDc5qpcOJFdls3vyytIVDIFuCcBtBac4c+mwgJUEP5okCjg8nwqeIjN3SSWFQu12kynMBpPV4PR0oUUMzBPCrWNO9It/U2CVI/1WKweo12wvLasmvaeSPpYxzTiQjAF+xEXz61fp0o0QOO69mkhe99RoMokFIMt0Tu9ZAFq6FpMuYAqG/x+7kDuRZs9XZhce7YAIU5m6q2d/05iXZpV4G275C4s4XWsK+Yl8ipmk60dmrjFyADIiq0KCjChfIgNGvl8vCexG3Z778s3DC9GsJ6P+BRlinIQ=