mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-09-27 04:13:07 +02:00
Add Gitlab CI automated deploys
This commit is contained in:
parent
82b041f3ba
commit
d22b96b983
30
.gitlab-ci.yml
Normal file
30
.gitlab-ci.yml
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
tags:
|
||||
- esphomedocs
|
||||
script:
|
||||
- make html
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/html
|
||||
|
||||
deploy:
|
||||
stage: 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 -H git@github.com:OttoWinter/esphomedocs.git >>/root/.ssh/id_rsa
|
||||
script:
|
||||
- git worktree add _build/html
|
||||
- make deploy
|
||||
- git -C _build/html push git@github.com:OttoWinter/esphomedocs.git:gh-pages
|
||||
only:
|
||||
- current
|
@ -9,6 +9,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
make \
|
||||
doxygen \
|
||||
openssh-client \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/*
|
||||
|
||||
RUN pip3 install --no-cache-dir --no-binary :all: \
|
||||
@ -20,7 +21,6 @@ RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && \
|
||||
npm install -g html-minifier
|
||||
|
||||
VOLUME /data/esphomedocs
|
||||
VOLUME /data/esphomelib
|
||||
EXPOSE 8000
|
||||
WORKDIR /data/esphomedocs
|
||||
|
||||
|
14
Makefile
14
Makefile
@ -8,8 +8,9 @@ SPHINXPROJ = esphomelib
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
ESPHOMELIB_PATH = ../esphomelib
|
||||
ESPHOMELIB_TAG = tags/v1.7.0
|
||||
|
||||
.PHONY: html cleanhtml doxyg cleandoxyg deploy help webserver Makefile
|
||||
.PHONY: html cleanhtml doxyg cleandoxyg deploy help webserver Makefile $(ESPHOMELIB_PATH)
|
||||
|
||||
html: _doxyxml
|
||||
$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@ -22,13 +23,18 @@ doxyg: cleandoxyg _doxyxml
|
||||
cleandoxyg:
|
||||
rm -rf _doxyxml
|
||||
|
||||
_doxyxml:
|
||||
_doxyxml: $(ESPHOMELIB_PATH)
|
||||
ESPHOMELIB_PATH=$(ESPHOMELIB_PATH) doxygen Doxygen
|
||||
|
||||
deploy: cleanhtml doxyg html
|
||||
$(ESPHOMELIB_PATH):
|
||||
@if [ ! -d "$(ESPHOMELIB_PATH)" ]; then \
|
||||
git clone --branch $(ESPHOMELIB_TAG) https://github.com/OttoWinter/esphomelib.git $(ESPHOMELIB_PATH); \
|
||||
fi
|
||||
|
||||
deploy: cleanhtml doxyg html $(ESPHOMELIB_PATH)
|
||||
touch "$(BUILDDIR)/html/.nojekyll"
|
||||
echo "esphomelib.com" >"$(BUILDDIR)/html/CNAME"
|
||||
cd "$(BUILDDIR)/html" && git add --all && git commit -m "Deploy to gh-pages"
|
||||
git -C "$(BUILDDIR)/html" add --all && git -C "$(BUILDDIR)/html" commit -m "Deploy to gh-pages"
|
||||
@printf "Run \033[0;36mcd $(BUILDDIR)/html && git push origin gh-pages\033[0m to deploy\n"
|
||||
|
||||
help:
|
||||
|
@ -18,6 +18,7 @@ See :doc:`/esphomeyaml/components/display/nextion` for setting up the display
|
||||
- platform: nextion
|
||||
page_id: 0
|
||||
component_id: 2
|
||||
name: "Nextion Component 2 Touch"
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
@ -16,7 +16,7 @@ Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **baud_rate** (*Optional*, int): The baud rate to use for the serial
|
||||
UART port. Defaults to 115200.
|
||||
UART port. Defaults to ``115200``. Set to ``0`` to disable logging via UART.
|
||||
- **tx_buffer_size** (*Optional*, string): The size of the buffer used
|
||||
for log messages. Decrease this if you’re having memory problems.
|
||||
Defaults to 512.
|
||||
|
@ -43,6 +43,8 @@ Configuration variables:
|
||||
a connection to the broker is established. See :ref:`mqtt-last_will_birth` for more information.
|
||||
- **will_message** (*Optional*, :ref:`mqtt-message`): The message to send when
|
||||
the MQTT connection is dropped. See :ref:`mqtt-last_will_birth` for more information.
|
||||
- **shutdown_message** (*Optional*, :ref:`mqtt-message`): The message to send when
|
||||
the node shuts down and the connection is closed cleanly. See :ref:`mqtt-last_will_birth` for more information.
|
||||
- **ssl_fingerprints** (*Optional*, list): Only on ESP8266. A list of SHA1 hashes used
|
||||
for verifying SSL connections. See :ref:`mqtt-ssl_fingerprints`
|
||||
for more information.
|
||||
|
@ -293,7 +293,7 @@ advanced stuff (see the full :doc:`API Reference </api/sensor/index>` for more i
|
||||
.. code:: yaml
|
||||
|
||||
// Within lambda, push a value of 42.0
|
||||
id(my_binary_sensor).push_new_value(42.0);
|
||||
id(my_sensor).push_new_value(42.0);
|
||||
|
||||
- ``value``: Retrieve the current value of the sensor that has passed through all sensor filters.
|
||||
Is ``NAN`` if no value has gotten through all filters yet.
|
||||
|
@ -89,7 +89,7 @@ Supported remote codes:
|
||||
protocol: 1
|
||||
rc_switch_type_a:
|
||||
group: '11001'
|
||||
device: '010000'
|
||||
device: '01000'
|
||||
state: True
|
||||
rc_switch_type_b:
|
||||
address: 4
|
||||
|
@ -156,8 +156,8 @@ Special thanks to all the contributors for this release:
|
||||
- And last but not least: `@brandond <https://github.com/brandond>`__ for his awesome work on the new
|
||||
time component
|
||||
|
||||
And in more personal news, I'm currently getting ready for my trip to Japan 🇯🇵 to represent Austria
|
||||
in this years `international olympiad in informatics (IOI) <https://ioi2018.jp/>`__ (hence also the relatively
|
||||
And in more personal news, I'm currently getting ready for my trip to Japan 🇯🇵 to be part of team Austria
|
||||
in this year's `international olympiad in informatics (IOI) <https://ioi2018.jp/>`__ (hence also the relatively
|
||||
short release notes). If you'll be attending too, come say hi :)
|
||||
|
||||
Other notable changes
|
||||
@ -194,7 +194,7 @@ Other notable changes
|
||||
|
||||
on_...:
|
||||
switch.turn_on: my_switch
|
||||
- You can now also have conditional actions. See !IF_ACTION!
|
||||
- You can now also have conditional actions. See :ref:`if_action`.
|
||||
- The esphomeyaml dashboard and HassIO add-on now can be configured with a password.
|
||||
- Fixed YAML anchors not working (you can now prefix keys with ``.`` to make esphomeyaml ignore them)
|
||||
- Made Dallas and DHT temperature sensor a bit more reliable by making the code a bit more efficient and thus resolving some timing issues.
|
||||
|
Loading…
Reference in New Issue
Block a user