esphome-docs/.gitlab-ci.yml
2018-09-25 15:07:03 +02:00

32 lines
782 B
YAML

---
build:
tags:
- esphomedocs
script:
- make html
except:
- current
deploy:
tags:
- esphomedocs
before_script:
- mkdir -p /root/.ssh
- echo "$GITHUB_PRIVATE_KEY" | tr -d '\r' >/root/.ssh/id_rsa
- chmod 600 /root/.ssh/id_rsa
- ssh-keyscan -t rsa github.com >>/root/.ssh/known_hosts
- git config --global user.email "$GITHUB_EMAIL"
- git config --global user.name "$GITHUB_NAME"
- git worktree prune
- rm -rf ../esphomelib
script:
- git fetch --force git@github.com:OttoWinter/esphomedocs.git gh-pages:gh-pages
- git worktree add _build/html gh-pages
- make deploy
- git -C _build/html push git@github.com:OttoWinter/esphomedocs.git gh-pages
artifacts:
paths:
- _build/html
only:
- current