CD: Deploy to S3
This commit is contained in:
parent
8d72ea6789
commit
8cb3e1e744
61
.drone.yml
61
.drone.yml
@ -11,29 +11,52 @@ steps:
|
||||
- git submodule init
|
||||
- git submodule update --recursive --remote
|
||||
|
||||
- name: build
|
||||
- name: build production
|
||||
image: plugins/hugo
|
||||
settings:
|
||||
hugo_version: 0.85.0
|
||||
hugo_version: 0.91.2
|
||||
validate: true
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
tar_tmp_path: /tmp/
|
||||
host: www.nemunai.re
|
||||
target: /var/www/nemunai.re/htdocs/
|
||||
source: public/*
|
||||
strip_components: 1
|
||||
username:
|
||||
from_secret: ssh_username
|
||||
key:
|
||||
from_secret: deploy_key
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
environment:
|
||||
HUGO_ENV: "production"
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
|
||||
- name: build drafts
|
||||
image: plugins/hugo
|
||||
settings:
|
||||
hugo_version: 0.91.2
|
||||
validate: true
|
||||
buildDrafts: true
|
||||
buildExpired: true
|
||||
buildFuture: true
|
||||
environment:
|
||||
HUGO_BASEURL: https://nemunai.re/${DRONE_BRANCH//\//-}/
|
||||
when:
|
||||
branch:
|
||||
exclude:
|
||||
- pull_request
|
||||
- master
|
||||
|
||||
- name: publish on s3
|
||||
image: plugins/s3
|
||||
settings:
|
||||
endpoint: https://storage.nemunai.re
|
||||
path_style: true
|
||||
bucket: nemunai.re-blog
|
||||
access_key:
|
||||
from_secret: s3_access_key
|
||||
secret_key:
|
||||
from_secret: s3_secret_key
|
||||
source: public/**/*
|
||||
strip_prefix: public/
|
||||
target: /${DRONE_BRANCH//\//-}
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
exclude:
|
||||
- renovate/*
|
||||
event:
|
||||
- cron
|
||||
- push
|
||||
- tag
|
||||
- custom
|
||||
|
Loading…
Reference in New Issue
Block a user