From 500c53658e47cc30aae995262fc9e0403e5769a2 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Wed, 11 Jul 2018 23:03:35 +0200 Subject: [PATCH] Replaced docker with netlify deployment (#65) --- .drone.yml | 28 ++++++++++------------------ Dockerfile | 14 -------------- config.yaml | 2 +- docker/caddy.conf | 7 ------- static/.gitkeep | 0 static/_headers | 6 ++++++ static/_redirects | 1 + 7 files changed, 18 insertions(+), 40 deletions(-) delete mode 100644 Dockerfile delete mode 100644 docker/caddy.conf delete mode 100644 static/.gitkeep create mode 100644 static/_headers create mode 100644 static/_redirects diff --git a/.drone.yml b/.drone.yml index a0938b0..cb13d37 100644 --- a/.drone.yml +++ b/.drone.yml @@ -2,6 +2,9 @@ workspace: base: /srv/app path: src +branches: + - master + clone: git: image: plugins/git:1 @@ -16,30 +19,19 @@ pipeline: - make clean - make build - docker: - image: plugins/docker:17.05 + publish: + image: lucap/drone-netlify:latest pull: true - secrets: [ docker_username, docker_password ] - repo: gitea/blog - tags: [ '${DRONE_BRANCH##release/v}' ] + secrets: [ netlify_token ] + site_id: b3cd7cc2-68be-4467-b3a6-38f1fdfa0cfc + path: public/ when: event: [ push ] - branch: [ release/* ] - - docker: - image: plugins/docker:17.05 - pull: true - secrets: [ docker_username, docker_password ] - repo: gitea/blog - tags: [ 'latest' ] - when: - event: [ push ] - branch: [ master ] discord: - image: appleboy/drone-discord:1.0.0 + image: appleboy/drone-discord:1 pull: true secrets: [ discord_webhook_id, discord_webhook_token ] when: - event: [ push, tag, pull_request ] + event: [ push, tag ] status: [ changed, failure ] diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 3e938a0..0000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM alpine:edge -EXPOSE 80 - -RUN apk update && \ - apk add \ - caddy \ - mailcap && \ - rm -rf \ - /var/cache/apk/* - -CMD ["/usr/sbin/caddy", "-conf", "/etc/caddy/caddy.conf"] - -COPY docker/caddy.conf /etc/caddy/caddy.conf -COPY public /srv/www diff --git a/config.yaml b/config.yaml index 56aaf4c..2cd6dfd 100644 --- a/config.yaml +++ b/config.yaml @@ -1,6 +1,6 @@ baseurl: https://blog.gitea.io/ languageCode: en-us -title: Gitea Blog +title: Blog theme: gitea disqusShortname: gitea diff --git a/docker/caddy.conf b/docker/caddy.conf deleted file mode 100644 index 9d1d61a..0000000 --- a/docker/caddy.conf +++ /dev/null @@ -1,7 +0,0 @@ -:80 { - root /srv/www - - errors { - 404 /404.html - } -} diff --git a/static/.gitkeep b/static/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/static/_headers b/static/_headers new file mode 100644 index 0000000..b3c268e --- /dev/null +++ b/static/_headers @@ -0,0 +1,6 @@ +/* + Content-Security-Policy: default-src 'self' + X-Frame-Options: DENY + X-Xss-Protection: 1; mode=block + X-Content-Type-Options: nosniff + Referrer-Policy: strict-origin-when-cross-origin diff --git a/static/_redirects b/static/_redirects new file mode 100644 index 0000000..ed69934 --- /dev/null +++ b/static/_redirects @@ -0,0 +1 @@ +https://gitea-blog.netlify.com/* https://blog.gitea.io/:splat 302!