2020-03-02 20:30:25 +01:00
---
2020-02-28 00:54:16 +01:00
kind : pipeline
type : docker
2020-03-08 05:11:26 +01:00
name : test-build
2020-02-28 00:54:16 +01:00
steps :
- name : hugo-extended
2020-03-03 22:33:04 +01:00
pull : always
2020-03-05 00:15:10 +01:00
image : immawanderer/archlinux-hugo:latest
2020-02-28 00:54:16 +01:00
commands :
- git submodule init
- git submodule update
2020-03-02 01:03:14 +01:00
- hugo version
2020-03-08 05:11:26 +01:00
- hugo --gc=true --minify
2020-03-02 20:25:56 +01:00
2020-03-08 05:11:26 +01:00
---
kind : pipeline
type : docker
name : deploy
steps :
2020-03-10 01:24:45 +01:00
- name : rsync-deploy
pull : if-not-exists
image : immawanderer/archlinux-hugo:latest
2020-03-08 07:38:50 +01:00
environment :
HUGO_KEY :
2020-03-08 07:28:59 +01:00
from_secret : hugo_key
2020-03-08 07:38:50 +01:00
HUGO_USER :
from_secret : hugo_user
HUGO_HOST :
from_secret : hugo_host
HUGO_DIR :
2020-03-08 05:44:34 +01:00
from_secret : hugo_dir
2020-03-10 01:54:10 +01:00
commands :
- git submodule init
- git submodule update
- rm -rfv ./public
- hugo --gc=true --minify
- echo $HUGO_KEY > ./hugo_deploy
- chmod -v 600 ./hugo_deploy
2020-03-10 02:39:27 +01:00
- rsync -av -e "ssh -vv -o KexAlgorithms=curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256 -o PreferredAuthentications=publickey -o PubkeyAuthentication=yes -o PasswordAuthentication=no -c aes256-ctr,aes256-cbc -o StrictHostKeyChecking=no -i ./hugo_deploy" --delete public/ $HUGO_USER@$HUGO_HOST:$HUGO_DIR
2020-03-10 01:54:10 +01:00
- shred -zuv -n 7 ./hugo_deploy
2020-03-08 05:11:26 +01:00
when :
status :
- success
2020-03-10 01:24:45 +01:00
depends_on :
- test-build
2020-03-02 20:25:56 +01:00
---
kind : pipeline
name : notifications
platform :
os : linux
arch : amd64
clone :
disable : true
trigger :
branch :
- master
2020-03-07 05:59:20 +01:00
- "dev*"
2020-03-02 20:25:56 +01:00
- "release/*"
event :
- push
- tag
status :
- success
- failure
depends_on :
2020-03-08 05:11:26 +01:00
- test-build
2020-03-02 20:25:56 +01:00
steps :
- name : discord
pull : always
image : appleboy/drone-discord:1.2.4
settings :
2020-03-10 02:34:42 +01:00
message : "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{/success}}\n"
2020-03-02 20:25:56 +01:00
webhook_id :
from_secret : discord_webhook_id
webhook_token :
from_secret : discord_webhook_token
2020-03-02 23:14:56 +01:00
---
kind : pipeline
name : notifications-cronbuild
platform :
os : linux
arch : amd64
clone :
disable : true
trigger :
event :
- cron
cron :
- hourly
- hourly-build
status :
- success
- failure
depends_on :
2020-03-08 05:11:26 +01:00
- test-build
2020-03-02 23:14:56 +01:00
steps :
- name : discord
pull : always
image : appleboy/drone-discord:1.2.4
settings :
2020-03-10 02:34:42 +01:00
message : "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{/success}}\n"
2020-03-02 23:14:56 +01:00
webhook_id :
from_secret : discord_webhook_hourly_id
webhook_token :
from_secret : discord_webhook_hourly_token
2020-03-08 05:11:26 +01:00
---
kind : pipeline
name : notifications-deploy
platform :
os : linux
arch : amd64
clone :
disable : true
trigger :
status :
- success
- failure
depends_on :
- deploy
steps :
- name : discord
pull : always
image : appleboy/drone-discord:1.2.4
settings :
2020-03-10 02:00:30 +01:00
message : "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` has been successfully deployed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed to deploy.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n{{ build.link }}\n {{/success}}\n\n"
2020-03-08 05:11:26 +01:00
webhook_id :
from_secret : discord_webhook_id
webhook_token :
from_secret : discord_webhook_token