use travis deploy
This commit is contained in:
parent
651e790084
commit
86d8765674
@ -1,19 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
name="Dongdong Tian"
|
|
||||||
mail="seisman.info@gmail.com"
|
|
||||||
docdir=pdf
|
|
||||||
pdfname=Makefile.pdf
|
|
||||||
|
|
||||||
echo "In master branch, deploying now..."
|
|
||||||
git config user.name "${name}"
|
|
||||||
git config user.email "${mail}"
|
|
||||||
|
|
||||||
# Deploy Github Pages
|
|
||||||
ghp-import -b gh-pages -n build/html -m 'Update by travis automatically'
|
|
||||||
git push "https://${GH_TOKEN}@${GH_REF}" gh-pages:gh-pages --force --quiet
|
|
||||||
|
|
||||||
# Deploy offline HTML and PDF files
|
|
||||||
mkdir build/${docdir} && cd build
|
|
||||||
cp latex/${pdfname} ${docdir}/
|
|
||||||
ghp-import -b ${docdir} ${docdir} -m 'Update by travis automatically'
|
|
||||||
git push "https://${GH_TOKEN}@${GH_REF}" ${docdir}:${docdir} --force --quiet
|
|
13
.travis.yml
13
.travis.yml
@ -1,6 +1,6 @@
|
|||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
- "3.5"
|
- "3.6"
|
||||||
|
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
@ -8,6 +8,7 @@ dist: trusty
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
- dev
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
@ -19,4 +20,12 @@ script:
|
|||||||
- make xelatexpdf
|
- make xelatexpdf
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
bash ./.travis-deploy.sh
|
- cp build/latex/Makefile.pdf build/html/
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
provider: pages
|
||||||
|
skip_cleanup: true
|
||||||
|
github_token: ${GH_TOKEN}
|
||||||
|
local_dir: build/html
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
Loading…
x
Reference in New Issue
Block a user