Failed to deploy because of ruby error

gh-pages

#1

It seems like there are some wrong with dpl-pages instead of my config.

Job: https://travis-ci.org/joshuaavalon/cloudflare-ddns/jobs/461701889
Log:

/home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-pages-1.10.6/lib/dpl/provider/pages.rb:141:in `mkdir': File exists @ dir_s_mkdir - /tmp/d20181130-3845-gyh65z/work (Errno::EEXIST)
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-pages-1.10.6/lib/dpl/provider/pages.rb:141:in `github_pull_or_init'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-pages-1.10.6/lib/dpl/provider/pages.rb:195:in `block in push_app'
	from /home/travis/.rvm/rubies/ruby-2.4.5/lib/ruby/2.4.0/tmpdir.rb:89:in `mktmpdir'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-pages-1.10.6/lib/dpl/provider/pages.rb:190:in `push_app'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.6/lib/dpl/provider.rb:199:in `block in deploy'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.6/lib/dpl/cli.rb:41:in `fold'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.6/lib/dpl/provider.rb:199:in `deploy'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.6/lib/dpl/cli.rb:32:in `run'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.6/lib/dpl/cli.rb:7:in `run'
	from /home/travis/.rvm/gems/ruby-2.4.5/gems/dpl-1.10.6/bin/dpl:5:in `<top (required)>'
	from /home/travis/.rvm/gems/ruby-2.4.5/bin/dpl:23:in `load'
	from /home/travis/.rvm/gems/ruby-2.4.5/bin/dpl:23:in `<main>'

config

dist: xenial
language: python
python: 3.7
stages:
  - test
  - build
jobs:
  include:
    - stage: test
      name: flake8
      install:
        - travis_retry pip install -r requirements.txt
        - travis_retry pip install -U flake8
      script:
        - flake8 --version
        - flake8 cloudflare_ddns
        - flake8 run.py
    - stage: test
      name: pylint
      before_install:
        - deactivate
        - /opt/python/3.7.1/bin/python -m venv ~/venv
        - source ~/venv/bin/activate
      install:
        - travis_retry pip install -r requirements.txt
        - travis_retry pip install -U pylint
      script:
        - pylint --version
        - pylint cloudflare_ddns
        - pylint run.py
    - stage: build
      name: mkdocs
      if: branch = master
      install:
        - travis_retry pip install -U mkdocs mkdocs-material
      script:
        - mkdocs build
      deploy:
        provider: pages
        skip-cleanup: true
        github-token: $GITHUB_TOKEN
        keep-history: true
        local-dir: site
        on:
          branch: master

#2

Apparently, it only fail in Xenial. Switch to Trusty on deploy fixes the issue.