Replaced docker with netlify deployment #37

Merged
tboerger merged 1 commits from deploy-netlify into master 2018-07-11 20:59:14 +00:00
6 changed files with 21 additions and 54 deletions

@ -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/redirects
tags: [ '${DRONE_BRANCH##release/v}' ]
secrets: [ netlify_token ]
site_id: 43f026dd-02e6-4cd9-846c-f8a1539d3570
path: public/
when:
event: [ push ]
branch: [ release/* ]
docker:
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
repo: gitea/redirects
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 ]

@ -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,22 +0,0 @@
:80 {
root /srv/www
errors {
404 /404.html
}
rewrite {
regexp /gitea/.+
to /gitea
}
rewrite {
regexp /sdk/.+
to /sdk
}
rewrite {
regexp /git/.+
to /git
}
}

6
static/_headers Normal file

@ -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

5
static/_redirects Normal file

@ -0,0 +1,5 @@
https://gitea-code.netlify.com/* https://code.gitea.io/:splat 302!
/gitea/* /gitea/ 302!
/sdk/* /sdk/ 302!
/git/* /git/ 302!