homepage/.drone.yml
surtur a318554a91
All checks were successful
continuous-integration/drone/push Build is passing
feat: bumped hugo version to 0.73.0
2020-06-23 21:49:44 +02:00

235 lines
5.3 KiB
YAML

---
kind: pipeline
type: docker
name: build
steps:
- name: hugo-extended
pull: always
image: immawanderer/fedora-hugo:latest
commands:
- git submodule init
- git submodule update
- hugo version
- hugo --gc=true --minify
---
kind: pipeline
type: docker
name: deploy
platform:
os: linux
arch: amd64
clone:
disable: true
steps:
- name: ssh-deploy
pull: if-not-exists
image: appleboy/drone-ssh:latest
settings:
host:
from_secret: hugo_host
username:
from_secret: hugo_user
password:
from_secret: hugo_passwd
script_stop: true
script:
- cd ~/dtya
- eval $(ssh-agent)
- ssh-add ~/.ssh/overlord
- git pull -4
- ./deploy "0.73.0"
when:
status:
- success
depends_on:
- build
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
branch:
- master
- "dev*"
event:
- push
- tag
status:
- success
- failure
depends_on:
- build
steps:
- name: discord
pull: if-not-exists
image: appleboy/drone-discord:latest
settings:
message: >
{{#success build.status}}
✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
```{{commit.message}}```
{{else}}
❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
```{{commit.message}}```
{{/success}}
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
---
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:
- build
steps:
- name: discord
pull: always
image: appleboy/drone-discord:latest
settings:
message: >
{{#success build.status}}
✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` succeeded.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{else}}
❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
```{{commit.message}}```
{{/success}}
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token
---
kind: pipeline
name: notifications-deploy
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
branch:
- master
- "dev*"
event:
- push
- tag
status:
- success
- failure
depends_on:
- deploy
steps:
- name: discord
pull: if-not-exists
image: appleboy/drone-discord:latest
settings:
message: >
{{#success build.status}}
✅ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` has been successfully deployed.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{else}}
❌ [Build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed to deploy.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{/success}}
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
---
kind: pipeline
name: notifications-cron-deploy
platform:
os: linux
arch: amd64
clone:
disable: true
trigger:
event:
- cron
cron:
- hourly
- hourly-build
status:
- success
- failure
depends_on:
- deploy
steps:
- name: discord
pull: always
image: appleboy/drone-discord:latest
settings:
message: >
{{#success build.status}}
✅ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` has been successfully deployed.
event: **`{{build.event}}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{else}}
❌ [Hourly build #{{build.number}}]({{build.link}}) of `{{repo.name}}` failed to deploy.
event: **`${DRONE_BUILD_EVENT}`**
commit [`${DRONE_COMMIT_SHA:0:7}`](https://git.dotya.ml/${DRONE_REPO}/commit/${DRONE_COMMIT_SHA}) by {{commit.author}} on `{{commit.branch}}`
{{/success}}
webhook_id:
from_secret: discord_webhook_hourly_id
webhook_token:
from_secret: discord_webhook_hourly_token