mirror of
https://github.com/thegeeklab/corenetworks.git
synced 2024-11-22 07:20:39 +00:00
publish to s3
This commit is contained in:
parent
5876afd308
commit
88c21fb6bb
@ -198,43 +198,19 @@ local PipelineDocs = {
|
|||||||
'cd docs/ && hugo-official',
|
'cd docs/ && 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/corenetworks.geekdocs.de/ /var/www/virtual/geeklab/html/corenetworks_freeze/',
|
|
||||||
'ln -sfn /var/www/virtual/geeklab/html/corenetworks_freeze /var/www/virtual/geeklab/corenetworks.geekdocs.de',
|
|
||||||
],
|
|
||||||
username: { from_secret: 'ssh_username' },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'publish',
|
name: 'publish',
|
||||||
image: 'appleboy/drone-scp',
|
image: 'plugins/s3-sync',
|
||||||
settings: {
|
settings: {
|
||||||
host: { from_secret: 'ssh_host' },
|
access_key: { from_secret: 's3_access_key' },
|
||||||
key: { from_secret: 'ssh_key' },
|
bucket: 'geekdocs',
|
||||||
rm: true,
|
delete: true,
|
||||||
source: 'docs/public/*',
|
endpoint: 'https://sp.rknet.org',
|
||||||
strip_components: 2,
|
path_style: true,
|
||||||
target: '/var/www/virtual/geeklab/html/corenetworks.geekdocs.de/',
|
secret_key: { from_secret: 's3_secret_access_key' },
|
||||||
username: { from_secret: 'ssh_username' },
|
source: 'docs/public/',
|
||||||
},
|
strip_prefix: 'docs/public/',
|
||||||
},
|
target: '/${DRONE_REPO_NAME}',
|
||||||
{
|
|
||||||
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/corenetworks.geekdocs.de /var/www/virtual/geeklab/corenetworks.geekdocs.de',
|
|
||||||
'rm -rf /var/www/virtual/geeklab/html/corenetworks_freeze/',
|
|
||||||
],
|
|
||||||
username: { from_secret: 'ssh_username' },
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
51
.drone.yml
51
.drone.yml
@ -220,45 +220,20 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- cd docs/ && hugo-official
|
- cd docs/ && 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/corenetworks.geekdocs.de/ /var/www/virtual/geeklab/html/corenetworks_freeze/
|
|
||||||
- ln -sfn /var/www/virtual/geeklab/html/corenetworks_freeze /var/www/virtual/geeklab/corenetworks.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
|
||||||
from_secret: ssh_key
|
delete: true
|
||||||
rm: true
|
endpoint: https://sp.rknet.org
|
||||||
source: docs/public/*
|
path_style: true
|
||||||
strip_components: 2
|
secret_key:
|
||||||
target: /var/www/virtual/geeklab/html/corenetworks.geekdocs.de/
|
from_secret: s3_secret_access_key
|
||||||
username:
|
source: docs/public/
|
||||||
from_secret: ssh_username
|
strip_prefix: docs/public/
|
||||||
|
target: /${DRONE_REPO_NAME}
|
||||||
- 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/corenetworks.geekdocs.de /var/www/virtual/geeklab/corenetworks.geekdocs.de
|
|
||||||
- rm -rf /var/www/virtual/geeklab/html/corenetworks_freeze/
|
|
||||||
username:
|
|
||||||
from_secret: ssh_username
|
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
@ -307,6 +282,6 @@ depends_on:
|
|||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 781460b587be9a823d27129d03b5dd9c1ec5db7f72241192e65f226366bff486
|
hmac: a5e57ed65ef9a112b5fa6de464f53526a3efc7df88e3bf6cf7ee130450a84017
|
||||||
|
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user