esphome-docs/.gitlab-ci.yml

34 lines
832 B
YAML
Raw Normal View History

2018-08-27 13:21:30 +02:00
---
build:
tags:
- esphomedocs
script:
2018-10-13 21:39:18 +02:00
- make ../esphomelib
2018-08-27 13:21:30 +02:00
- make html
2018-09-25 13:50:13 +02:00
except:
- current
2018-08-27 13:21:30 +02:00
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
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
- rm -rf ../esphomelib
2018-08-27 13:21:30 +02:00
script:
2018-09-25 13:50:13 +02:00
- git fetch --force git@github.com:OttoWinter/esphomedocs.git gh-pages:gh-pages
- git worktree add _build/html gh-pages
2018-10-13 21:39:18 +02:00
- make ../esphomelib
2018-08-27 13:21:30 +02:00
- make deploy
2018-09-25 13:50:13 +02:00
- git -C _build/html push git@github.com:OttoWinter/esphomedocs.git gh-pages
2018-08-27 16:20:22 +02:00
artifacts:
paths:
- _build/html
2018-08-27 13:21:30 +02:00
only:
- current