Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.

Commit 5eda354

Browse files
committed
Moved CI scripts into .ci; Don't try to deploy the website on PR builds.
1 parent d7d1b1c commit 5eda354

File tree

4 files changed

+33
-20
lines changed

4 files changed

+33
-20
lines changed

.ci/after_success.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then echo "Not a master build, not deploying"; exit 0; fi
4+
5+
# deploy build/splitgraph
6+
# decrypt our key
7+
openssl aes-256-cbc -K $encrypted_57ed443d832d_key -iv $encrypted_57ed443d832d_iv -in travis_rsa.enc -out travis_rsa -d
8+
chmod 600 travis_rsa
9+
mv travis_rsa ~/.ssh/id_rsa
10+
11+
# get us to trust splitgraph.com
12+
echo "[splitgraph.com]:9092 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApm3oOAWtA+EUcWykQwAoX+B+5q+hAK1jHPOAsmdttEZxBe/yjzfn31ot2cp+SS8TRy4PZxMeFlfqx/OdIeLuwbPm6iOi+6LlgTTkaxLbvgv6ugLEXLfMgQ5KBOPZ3w7SGw6K4yO7s15zNri5NLx0juZELoA4jyVrq/A25l9GDW6WiBe8LLrdn/Lf6jOBhJKI8M8krgCdrnRiVKNmAgSo7iibFBoefum6wm8hwzoKTaot8SFB1iVhblgdcLrDwziE8zuwtjSjy9Bf+IVsLag6+ShByXbh5tWrRDpN3IYDyjzUgJtIkKTGP2uSuBrdRXMgyy7NyavKtAwSNLgXJlxfPQ==" >> $HOME/.ssh/known_hosts
13+
bash ./.ci/remote_deploy.sh
File renamed without changes.

.ci/script.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Build docs from Splitgraph's master branch
4+
git clone https://github.com/splitgraph/splitgraph.git && cd splitgraph
5+
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
6+
7+
. $HOME/.poetry/env
8+
poetry install -E ingestion
9+
cd docs && poetry run make clean html
10+
11+
# Build commandline docs
12+
cd .. && poetry run python ../website/generate_markdown_commandline_reference.py docs/sgr -f
13+
14+
# Build static site
15+
cd ../website && yarn install && yarn build
16+
17+
# Inject API docs into the site
18+
cp ../splitgraph/docs/_build/html -r build/splitgraph/sphinx

.travis.yml

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,6 @@ cache:
1212
addons:
1313
ssh_known_hosts: splitgraph.com
1414
script:
15-
# Build docs from Splitgraph's master branch
16-
- git clone https://github.com/splitgraph/splitgraph.git && cd splitgraph
17-
- curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
18-
- source $HOME/.poetry/env
19-
- poetry install -E ingestion
20-
- cd docs && poetry run make clean html
21-
# Build commandline docs
22-
- cd .. && poetry run python ../website/generate_markdown_commandline_reference.py docs/sgr -f
23-
# Build static site
24-
- cd ../website && yarn install && yarn build
25-
# Inject API docs into the site
26-
- cp ../splitgraph/docs/_build/html -r build/splitgraph/sphinx
15+
- './.ci/script.sh'
2716
after_success:
28-
# deploy build/splitgraph
29-
# decrypt our key
30-
- openssl aes-256-cbc -K $encrypted_57ed443d832d_key -iv $encrypted_57ed443d832d_iv -in ../travis_rsa.enc -out travis_rsa -d
31-
- chmod 600 travis_rsa
32-
- mv travis_rsa ~/.ssh/id_rsa
33-
# get us to trust splitgraph.com
34-
- echo "[splitgraph.com]:9092 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApm3oOAWtA+EUcWykQwAoX+B+5q+hAK1jHPOAsmdttEZxBe/yjzfn31ot2cp+SS8TRy4PZxMeFlfqx/OdIeLuwbPm6iOi+6LlgTTkaxLbvgv6ugLEXLfMgQ5KBOPZ3w7SGw6K4yO7s15zNri5NLx0juZELoA4jyVrq/A25l9GDW6WiBe8LLrdn/Lf6jOBhJKI8M8krgCdrnRiVKNmAgSo7iibFBoefum6wm8hwzoKTaot8SFB1iVhblgdcLrDwziE8zuwtjSjy9Bf+IVsLag6+ShByXbh5tWrRDpN3IYDyjzUgJtIkKTGP2uSuBrdRXMgyy7NyavKtAwSNLgXJlxfPQ==" >> $HOME/.ssh/known_hosts
35-
- bash ../remote_deploy.sh
17+
- './.ci/after_success.sh'

0 commit comments

Comments
 (0)