Permalink
Browse files

简化travis

  • Loading branch information...
1 parent ef83d88 commit c5e7825557cf7e52823e6b9055542eead18e6cf7 @seisman committed May 31, 2016
Showing with 24 additions and 62 deletions.
  1. +0 −34 .texlive-minmal-installer.sh
  2. +6 −18 .travis-deploy.sh
  3. +17 −9 .travis.yml
  4. +1 −1 Makefile
@@ -1,34 +0,0 @@
-#!/bin/bash
-#
-# Install minimal TeXLive 2015 for SAC_Docs_zh
-#
-REMOTE=http://ctan.sharelatex.com/tex-archive/systems/texlive/tlnet/
-TEXBIN=/usr/local/texlive/2015/bin/x86_64-linux
-PACKAGES="environ trimspaces zhnumber fandol zapfding titlesec algorithm2e relsize latexmk ctex datetime2 tracklang minted ifplatform xstring enumitem tikz-3dplot siunitx symbol footmisc framed manfnt"
-
-# install TeXLive
-mkdir -p /tmp/install-texlive
-cd /tmp/install-texlive/
-curl -sSL $REMOTE/install-tl-unx.tar.gz | tar -xz -C ./ --strip-components=1
-
-cat << EOF > texlive.profile
-selected_scheme scheme-minimal
-TEXMFHOME ~/.texmf
-collection-basic 1
-collection-genericrecommended 1
-collection-latex 1
-collection-latexextra 0
-collection-latexrecommended 1
-collection-xetex 1
-collection-langchinese 0
-option_autobackup 0
-option_doc 0
-option_src 0
-EOF
-
-sudo ./install-tl -profile texlive.profile -repository $REMOTE
-sudo $TEXBIN/tlmgr update --self --all --repository $REMOTE
-sudo $TEXBIN/tlmgr install $PACKAGES --repository $REMOTE
-
-cd -
-echo export PATH=$TEXBIN:'$PATH' > srcfile
View
@@ -1,21 +1,9 @@
#!/bin/bash
#
-# Deploy master branch only
+# Deploy PDF file to pdf branch
#
-# TRAVIS_BRANCH:
-# - triggered by commit => the name of the branch currently being built
-# - triggered by a PR => the name of the branch targeted by the pull request
-# TRAVIS_PULL_REQUEST:
-# - is a pull request => pull request number
-# - not a pull request => false
-
-if [ ${TRAVIS_BRANCH} = "master" -a ${TRAVIS_PULL_REQUEST} = 'false' ]; then
- echo "In master branch, deploying now..."
- git config user.name "Dongdong Tian"
- git config user.email "seisman.info@gmail.com"
- mkdir tmpdir && cp SAC_Docs.pdf tmpdir/
- ghp-import -b pdf tmpdir -m 'Update by travis automatically'
- git push "https://${GH_TOKEN}@${GH_REF}" pdf:pdf --force --quiet
-else
- echo "Not in master branch"
-fi
+git config user.name "Dongdong Tian"
+git config user.email "seisman.info@gmail.com"
+mkdir tmpdir && cp SAC_Docs.pdf tmpdir/
+ghp-import -b pdf tmpdir -m 'Update by travis automatically'
+git push "https://${GH_TOKEN}@${GH_REF}" pdf:pdf --force --quiet
View
@@ -1,20 +1,28 @@
language: python
-python:
- - "3.5"
sudo: required
dist: trusty
-branches:
- only:
- - master
+branch:
+ except:
+ - pdf
install:
+ # python
- pip install pygments ghp-import
- - bash ./.texlive-minmal-installer.sh
- - source ./srcfile
+ # TeXLive
+ - curl -sSL https://raw.githubusercontent.com/ustctug/mini-texlive/master/install-tl.sh -o install-tl.sh
+ - sed -i 's!http://mirrors.ustc.edu.cn/CTAN!http://ctan.sharelatex.com/tex-archive!' install-tl.sh
+ - sudo bash install-tl.sh
+ - source ~/.bash_profile
+ - export TLMGR=`which tlmgr`
+ - sudo $TLMGR update --self --all -repository http://ctan.sharelatex.com/tex-archive/systems/texlive/tlnet/
+ - sudo $TLMGR install tracklang siunitx symbol
script:
make
-after_success:
- bash .travis-deploy.sh
+deploy:
+ provider: script
+ script: ./.travis-deploy.sh
+ on:
+ branch: master
View
@@ -12,7 +12,7 @@ DOC = SAC_Docs
all: $(DOC).pdf
$(DOC).pdf: $(DOC).tex
- latexmk -xelatex -shell-escape -interaction=nonstopmode $^
+ latexmk -xelatex -shell-escape $^
clean:
latexmk -c

0 comments on commit c5e7825

Please sign in to comment.