Compare commits
No commits in common. "31ee1dae7fbb65405c615100aa9fc878144394bc" and "8d07fe732cf60cc9dd67acd016a6070b10402105" have entirely different histories.
31ee1dae7f
...
8d07fe732c
|
|
@ -1,15 +0,0 @@
|
||||||
# By default, ignore everything
|
|
||||||
*
|
|
||||||
|
|
||||||
# Blog source
|
|
||||||
!archetypes/
|
|
||||||
!content/
|
|
||||||
!data/
|
|
||||||
!layouts/
|
|
||||||
!resources/
|
|
||||||
!static/
|
|
||||||
!themes/
|
|
||||||
!config.yaml
|
|
||||||
|
|
||||||
# Nginx config file
|
|
||||||
!nginx.conf
|
|
||||||
|
|
@ -1,27 +1,17 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
# build:
|
build:
|
||||||
# image: alpine:3
|
image: alpine:3
|
||||||
# commands:
|
commands:
|
||||||
# - apk update
|
- apk update
|
||||||
# - apk add --no-cache hugo
|
- apk add --no-cache hugo
|
||||||
# - hugo --minify
|
- hugo --minify
|
||||||
|
|
||||||
# deploy:
|
deploy:
|
||||||
# image: alpine:3
|
image: alpine:3
|
||||||
# commands:
|
commands:
|
||||||
# - apk update
|
- apk update
|
||||||
# - apk add --no-cache rsync openssh-client
|
- apk add --no-cache rsync openssh-client
|
||||||
# - eval $(ssh-agent)
|
- eval $(ssh-agent)
|
||||||
# - echo "$DEPLOY_KEY" | ssh-add -
|
- echo "$DEPLOY_KEY" | ssh-add -
|
||||||
# - rsync -e "ssh -p $DEPLOY_PORT -o 'StrictHostKeyChecking=no'" -az --delete public/ "$DEPLOY_DEST"
|
- rsync -e "ssh -p $DEPLOY_PORT -o 'StrictHostKeyChecking=no'" -az --delete public/ "$DEPLOY_DEST"
|
||||||
# secrets: [ deploy_key, deploy_port, deploy_dest ]
|
secrets: [ deploy_key, deploy_port, deploy_dest ]
|
||||||
publish:
|
|
||||||
image: plugins/docker
|
|
||||||
repo: chewingbever/blog
|
|
||||||
tag: [ latest ]
|
|
||||||
secrets:
|
|
||||||
- docker_username
|
|
||||||
- docker_password
|
|
||||||
when:
|
|
||||||
branch: master
|
|
||||||
event: push
|
|
||||||
|
|
|
||||||
18
Dockerfile
18
Dockerfile
|
|
@ -1,18 +0,0 @@
|
||||||
FROM alpine:latest AS builder
|
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
|
||||||
|
|
||||||
# Install Hugo
|
|
||||||
RUN apk add --no-cache hugo
|
|
||||||
|
|
||||||
# Copy site files for building
|
|
||||||
COPY . ./
|
|
||||||
|
|
||||||
# Generate the site
|
|
||||||
RUN hugo --minify
|
|
||||||
|
|
||||||
|
|
||||||
FROM nginx:alpine
|
|
||||||
|
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
|
||||||
COPY --from=builder /usr/src/app/public /usr/share/nginx/html
|
|
||||||
26
nginx.conf
26
nginx.conf
|
|
@ -1,26 +0,0 @@
|
||||||
worker_processes 1;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
# https://stackoverflow.com/a/51360290/6483444
|
|
||||||
map $sent_http_content_type $expires {
|
|
||||||
default off;
|
|
||||||
text/html epoch;
|
|
||||||
text/css max;
|
|
||||||
application/javascript max;
|
|
||||||
~image/ max;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
|
||||||
server_name _;
|
|
||||||
listen 80;
|
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html;
|
|
||||||
include mime.types;
|
|
||||||
expires $expires;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue