2018-08-27 13:21:30 +02:00
|
|
|
---
|
2018-10-20 20:28:04 +02:00
|
|
|
.deploy: &deploy
|
2018-08-27 13:21:30 +02:00
|
|
|
tags:
|
|
|
|
- esphomedocs
|
|
|
|
before_script:
|
|
|
|
- mkdir -p /root/.ssh
|
2018-10-20 20:28:04 +02:00
|
|
|
- echo "$PRIVATE_KEY" | tr -d '\r' >/root/.ssh/id_rsa
|
2018-08-27 13:21:30 +02:00
|
|
|
- chmod 600 /root/.ssh/id_rsa
|
2018-09-25 13:50:13 +02:00
|
|
|
- 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
|
2018-10-20 20:28:04 +02:00
|
|
|
- rm -rf ../esphomelib _build/html/
|
2018-08-27 13:21:30 +02:00
|
|
|
script:
|
2018-10-20 20:28:04 +02:00
|
|
|
- mkdir -p _build/html
|
|
|
|
- git fetch --force git@github.com:${TARGET_REPO}.git gh-pages:gh-pages
|
2018-09-25 13:50:13 +02:00
|
|
|
- git worktree add _build/html gh-pages
|
2018-10-13 21:39:18 +02:00
|
|
|
- make ../esphomelib
|
2018-10-20 20:28:04 +02:00
|
|
|
- make html
|
2018-11-19 19:05:59 +01:00
|
|
|
- make convertimages
|
2018-10-20 20:28:04 +02:00
|
|
|
- git -C _build/html add --all
|
|
|
|
- git -C _build/html commit -m "Deploy to gh-pages"
|
|
|
|
- git -C _build/html push -f git@github.com:${TARGET_REPO}.git gh-pages
|
2018-11-19 18:32:16 +01:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- _build/doctrees
|
2018-10-20 20:28:04 +02:00
|
|
|
|
|
|
|
deploy-release:
|
|
|
|
<<: *deploy
|
|
|
|
variables:
|
|
|
|
TARGET_REPO: OttoWinter/esphomedocs
|
|
|
|
PRIVATE_KEY: ${GITHUB_PRIVATE_KEY}
|
|
|
|
CNAME: esphomelib.com
|
2018-11-14 22:12:27 +01:00
|
|
|
BASE_URL: https://esphomelib.com
|
2018-08-27 13:21:30 +02:00
|
|
|
only:
|
|
|
|
- current
|
2018-10-20 18:49:56 +02:00
|
|
|
|
|
|
|
deploy-beta:
|
2018-10-20 20:28:04 +02:00
|
|
|
<<: *deploy
|
|
|
|
variables:
|
|
|
|
TARGET_REPO: OttoWinter/esphomedocs-beta
|
|
|
|
PRIVATE_KEY: ${GITHUB_BETA_PRIVATE_KEY}
|
|
|
|
CNAME: beta.esphomelib.com
|
2018-11-14 22:12:27 +01:00
|
|
|
BASE_URL: https://beta.esphomelib.com
|
2018-10-20 18:49:56 +02:00
|
|
|
only:
|
|
|
|
- rc
|