From 3380add83e1f2d1f185abd22032eba7d2c2d8e3a Mon Sep 17 00:00:00 2001 From: Tobias Manske Date: Tue, 7 Jun 2022 22:27:47 +0200 Subject: [PATCH] Add drone yaml --- .drone.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 4 ++++ 2 files changed, 58 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..f5c4b1a --- /dev/null +++ b/.drone.yml @@ -0,0 +1,54 @@ +kind: pipeline +type: docker +name: default + +trigger: + branch: + - master + event: + include: + - push + - cron + - custom + +steps: + - name: submodules + image: alpine/git + commands: + - git submodule update --init --recursive + + - name: Compress Images + image: registry.tobiasmanske.de/docker-avif-webp:latest + secrets: [registry] + depends_on: + - submodules + + - name: Build HTML + image: klakegg/hugo:alpine + commands: + - hugo --minify + depends_on: + - Compress Images + - submodules + + - name: Build Image + image: plugins/docker + settings: + repo: registry.tobiasmanske.de/tobiasmanske.de + force_tag: true + registry: registry.tobiasmanske.de + username: + from_secret: docker_username + password: + from_secret: docker_password + tags: + - latest + - ${DRONE_BRANCH} + cache_from: + - "registry.tobiasmanske.de/tobiasmanske.de:master" + - "registry.tobiasmanske.de/tobiasmanske.de:${DRONE_BRANCH}" + depends_on: + - Build HTML + +image_pull_secrets: + - registry diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..99be01e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM httpd:alpine +EXPOSE 80 +COPY ./docs /usr/local/apache2/htdocs +RUN chown -R 1000 /usr/local/apache2/htdocs