74 lines
1.6 KiB
YAML
74 lines
1.6 KiB
YAML
|
---
|
||
|
kind: pipeline
|
||
|
name: default
|
||
|
|
||
|
concurrency:
|
||
|
limit: 1
|
||
|
|
||
|
steps:
|
||
|
- name: assets
|
||
|
image: byrnedo/alpine-curl
|
||
|
commands:
|
||
|
- mkdir -p docs/themes/hugo-geekdoc/
|
||
|
- curl -L https://github.com/xoxys/hugo-geekdoc/releases/latest/download/hugo-geekdoc.tar.gz | tar -xz -C docs/themes/hugo-geekdoc/ --strip-components=1
|
||
|
|
||
|
- name: sync
|
||
|
image: xoxys/git-batch:latest
|
||
|
commands:
|
||
|
- git-batch
|
||
|
|
||
|
- name: build
|
||
|
image: klakegg/hugo:0.59.1-ext-alpine
|
||
|
commands:
|
||
|
- hugo-official
|
||
|
|
||
|
- name: freeze
|
||
|
image: appleboy/drone-ssh
|
||
|
settings:
|
||
|
host:
|
||
|
from_secret: ssh_host
|
||
|
key:
|
||
|
from_secret: ssh_key
|
||
|
script:
|
||
|
- cp -R /var/www/virtual/geeklab/html/galaxy.geekdocs.de/ /var/www/virtual/geeklab/html/galaxy_freeze/
|
||
|
- ln -sfn /var/www/virtual/geeklab/html/galaxy_freeze /var/www/virtual/geeklab/galaxy.geekdocs.de
|
||
|
username:
|
||
|
from_secret: ssh_username
|
||
|
|
||
|
- name: publish
|
||
|
image: appleboy/drone-scp
|
||
|
settings:
|
||
|
host:
|
||
|
from_secret: ssh_host
|
||
|
key:
|
||
|
from_secret: ssh_key
|
||
|
rm: true
|
||
|
source: public/*
|
||
|
strip_components: 2
|
||
|
target: /var/www/virtual/geeklab/html/galaxy.geekdocs.de/
|
||
|
username:
|
||
|
from_secret: ssh_username
|
||
|
|
||
|
- name: cleanup
|
||
|
image: appleboy/drone-ssh
|
||
|
settings:
|
||
|
host:
|
||
|
from_secret: ssh_host
|
||
|
key:
|
||
|
from_secret: ssh_key
|
||
|
script:
|
||
|
- ln -sfn /var/www/virtual/geeklab/html/galaxy.geekdocs.de /var/www/virtual/geeklab/galaxy.geekdocs.de
|
||
|
- rm -rf /var/www/virtual/geeklab/html/galaxy_freeze/
|
||
|
username:
|
||
|
from_secret: ssh_username
|
||
|
|
||
|
trigger:
|
||
|
ref:
|
||
|
- refs/heads/source
|
||
|
- refs/pull/**
|
||
|
---
|
||
|
kind: signature
|
||
|
hmac: 39b8bc95d0a47dc66226239995c1c8a308e1cc9e5de9336c304fb7fa39103544
|
||
|
|
||
|
...
|