Fix deploy
This commit is contained in:
parent
a178e2fbe7
commit
9ae98f8742
|
@ -1,28 +1,29 @@
|
|||
---
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
build:
|
||||
stage: build
|
||||
tags:
|
||||
- esphomedocs
|
||||
script:
|
||||
- make html
|
||||
except:
|
||||
- current
|
||||
|
||||
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
|
||||
- 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 worktree add _build/html
|
||||
- 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
|
||||
- git -C _build/html push git@github.com:OttoWinter/esphomedocs.git gh-pages
|
||||
artifacts:
|
||||
paths:
|
||||
- _build/html
|
||||
|
|
|
@ -16,10 +16,6 @@ RUN pip3 install --no-cache-dir --no-binary :all: \
|
|||
sphinx \
|
||||
breathe
|
||||
|
||||
RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - && \
|
||||
apt-get install -y nodejs && \
|
||||
npm install -g html-minifier
|
||||
|
||||
VOLUME /data/esphomedocs
|
||||
EXPOSE 8000
|
||||
WORKDIR /data/esphomedocs
|
||||
|
|
Loading…
Reference in New Issue