publish to s3
This commit is contained in:
parent
9199d13f83
commit
9fdd2d0aa7
1 changed files with 15 additions and 41 deletions
56
.drone.yml
56
.drone.yml
|
@ -57,13 +57,13 @@ trigger:
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: docs
|
name: docs
|
||||||
|
|
||||||
concurrency:
|
|
||||||
limit: 1
|
|
||||||
|
|
||||||
platform:
|
platform:
|
||||||
os: linux
|
os: linux
|
||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
limit: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: assets
|
- name: assets
|
||||||
image: byrnedo/alpine-curl
|
image: byrnedo/alpine-curl
|
||||||
|
@ -76,45 +76,19 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- cd exampleSite/ && hugo-official
|
- cd exampleSite/ && hugo-official
|
||||||
|
|
||||||
- name: freeze
|
|
||||||
image: appleboy/drone-ssh:1.5.5
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: ssh_host
|
|
||||||
key:
|
|
||||||
from_secret: ssh_key
|
|
||||||
script:
|
|
||||||
- cp -R /var/www/virtual/geeklab/html/geekdocs.de/ /var/www/virtual/geeklab/html/geekdocs_freeze/
|
|
||||||
- ln -sfn /var/www/virtual/geeklab/html/geekdocs_freeze /var/www/virtual/geeklab/geekdocs.de
|
|
||||||
username:
|
|
||||||
from_secret: ssh_username
|
|
||||||
|
|
||||||
- name: publish
|
- name: publish
|
||||||
image: appleboy/drone-scp
|
image: plugins/s3-sync
|
||||||
settings:
|
settings:
|
||||||
host:
|
access_key:
|
||||||
from_secret: ssh_host
|
from_secret: s3_access_key
|
||||||
key:
|
bucket: geekdocs-root
|
||||||
from_secret: ssh_key
|
delete: true
|
||||||
rm: true
|
endpoint: https://sp.rknet.org
|
||||||
source: exampleSite/public/*
|
path_style: true
|
||||||
strip_components: 2
|
secret_key:
|
||||||
target: /var/www/virtual/geeklab/html/geekdocs.de/
|
from_secret: s3_secret_access_key
|
||||||
username:
|
source: docs/public/
|
||||||
from_secret: ssh_username
|
strip_prefix: docs/public/
|
||||||
|
|
||||||
- name: cleanup
|
|
||||||
image: appleboy/drone-ssh:1.5.5
|
|
||||||
settings:
|
|
||||||
host:
|
|
||||||
from_secret: ssh_host
|
|
||||||
key:
|
|
||||||
from_secret: ssh_key
|
|
||||||
script:
|
|
||||||
- ln -sfn /var/www/virtual/geeklab/html/geekdocs.de /var/www/virtual/geeklab/geekdocs.de
|
|
||||||
- rm -rf /var/www/virtual/geeklab/html/geekdocs_freeze/
|
|
||||||
username:
|
|
||||||
from_secret: ssh_username
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
|
@ -163,6 +137,6 @@ depends_on:
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 619b71bf888e764e4f97ac00d707b963284f3619ee2e9c47851e9a63f16df6bc
|
hmac: bc43c76e82f4405a0b3a5efc1e76fbf2ee2253d9988216c4244bb39a8d619de9
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
Loading…
Reference in a new issue