Skip to content

Commit 7a2e875

Browse files
committed
ci: add jobs
1 parent 3f15218 commit 7a2e875

File tree

2 files changed

+36
-24
lines changed

2 files changed

+36
-24
lines changed

.travis.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
language: python
2-
python:
3-
- "3.5"
4-
- "3.6"
52
install:
63
- pip install -r dev-requirements.txt
74
- pip install pytest-pep8
8-
script:
9-
- make ci
10-
- make build-docs
11-
- bash publish-docs.sh
12-
5+
jobs:
6+
include:
7+
- stage: test
8+
script:
9+
- make ci
10+
- make build-docs
11+
python: '3.5'
12+
- stage: test
13+
script:
14+
- make ci
15+
- make build-docs
16+
python: '3.6'
17+
- stage: docs
18+
script:
19+
- make build-docs && bash publish-docs.sh
20+
python: '3.6'

publish-docs.sh

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
#!/usr/bin/bash
2-
export GH_REF="github.com/snnucs/SNNU-SDK.git"
3-
cd docs && make html
4-
git clone https://${GH_REF} html
5-
cd html
6-
git checkout gh-pages
7-
git pull origin
8-
sudo mkdir SNNU-SDK-docs/.git
9-
sudo mv html/.git/ SNNU-SDK-docs/.git/
10-
cd SNNU-SDK-docs
11-
pwd
12-
rm -rf doctrees
13-
git config --global user.name "Qi Zhao"
14-
git config --global user.email "[email protected]"
15-
git add .
16-
git commit -m "Travis CI Auto Builder at `date +"%Y-%m-%d %H:%M"`"
1+
#!/bin/bash
2+
export GH_REF="github.com/snnucs/SNNU-SDK.git"
3+
cd docs && make html
4+
pwd
5+
git clone https://${GH_REF} html
6+
cd html
7+
git checkout gh-pages
8+
git pull origin
9+
cd ..
10+
pwd
11+
ls
12+
sudo cd SNNU-SDK-docs && sudo mkdir .git
13+
sudo mv html/.git/ SNNU-SDK-docs/.git/
14+
sudo cd SNNU-SDK-docs
15+
pwd
16+
rm -rf doctrees
17+
git config --global user.name "Qi Zhao"
18+
git config --global user.email "[email protected]"
19+
git add .
20+
git commit -m "Travis CI Auto Builder at `date +"%Y-%m-%d %H:%M"`"
1721
git push --quiet "https://${GH_TOKEN}@${GH_REF}" gh-pages:gh-pages

0 commit comments

Comments
 (0)