diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5511a930e..5d7f1f176 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 diff --git a/Dockerfile b/Dockerfile index 76e8431ac..31c49ca72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/minify.sh b/minify.sh deleted file mode 100755 index febd20737..000000000 --- a/minify.sh +++ /dev/null @@ -1,3 +0,0 @@ -find _build/html/ -name "*.html" | while read html;do - html-minifier --collapse-whitespace --remove-comments --remove-optional-tags --remove-redundant-attributes --remove-script-type-attributes --remove-tag-whitespace --use-short-doctype "$html" -o "$html" -done