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
|
base: /srv/app
|
||||||
path: src
|
path: src
|
||||||
|
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
clone:
|
clone:
|
||||||
git:
|
git:
|
||||||
image: plugins/git:1
|
image: plugins/git:1
|
||||||
|
@ -16,30 +19,19 @@ pipeline:
|
||||||
- make clean
|
- make clean
|
||||||
- make build
|
- make build
|
||||||
|
|
||||||
docker:
|
publish:
|
||||||
image: plugins/docker:17.05
|
image: lucap/drone-netlify:latest
|
||||||
pull: true
|
pull: true
|
||||||
secrets: [ docker_username, docker_password ]
|
secrets: [ netlify_token ]
|
||||||
repo: gitea/blog
|
site_id: b3cd7cc2-68be-4467-b3a6-38f1fdfa0cfc
|
||||||
tags: [ '${DRONE_BRANCH##release/v}' ]
|
path: public/
|
||||||
when:
|
when:
|
||||||
event: [ push ]
|
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:
|
discord:
|
||||||
image: appleboy/drone-discord:1.0.0
|
image: appleboy/drone-discord:1
|
||||||
pull: true
|
pull: true
|
||||||
secrets: [ discord_webhook_id, discord_webhook_token ]
|
secrets: [ discord_webhook_id, discord_webhook_token ]
|
||||||
when:
|
when:
|
||||||
event: [ push, tag, pull_request ]
|
event: [ push, tag ]
|
||||||
status: [ changed, failure ]
|
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/
|
baseurl: https://blog.gitea.io/
|
||||||
languageCode: en-us
|
languageCode: en-us
|
||||||
title: Gitea Blog
|
title: Blog
|
||||||
theme: gitea
|
theme: gitea
|
||||||
disqusShortname: 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!
|
Загрузка…
Ссылка в новой задаче