Replaced docker with netlify deployment (#65)
This commit is contained in:
Родитель
0a218426de
Коммит
500c53658e
28
.drone.yml
28
.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 ]
|
||||
|
|
14
Dockerfile
14
Dockerfile
|
@ -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
|
|
@ -1,6 +1,6 @@
|
|||
baseurl: https://blog.gitea.io/
|
||||
languageCode: en-us
|
||||
title: Gitea Blog
|
||||
title: Blog
|
||||
theme: gitea
|
||||
disqusShortname: gitea
|
||||
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
:80 {
|
||||
root /srv/www
|
||||
|
||||
errors {
|
||||
404 /404.html
|
||||
}
|
||||
}
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
https://gitea-blog.netlify.com/* https://blog.gitea.io/:splat 302!
|
Загрузка…
Ссылка в новой задаче