added .drone.yml and update README
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
080e770bd3
commit
a84244a400
2 changed files with 91 additions and 1 deletions
83
.drone.yml
Normal file
83
.drone.yml
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
when: # Only run the pipeline when it's a push to master
|
||||
event: [push]
|
||||
|
||||
workspace:
|
||||
# path: /src
|
||||
|
||||
steps:
|
||||
- name: versioncheck
|
||||
image: klakegg/hugo:latest-ext
|
||||
commands:
|
||||
- hugo version
|
||||
|
||||
- name: build-draft
|
||||
image: klakegg/hugo:latest-ext
|
||||
commands:
|
||||
- hugo -D -E -F -b https://draft.donaldharper.com/
|
||||
when:
|
||||
branch: [draft]
|
||||
|
||||
- name: rsync-draft
|
||||
image: drillster/drone-rsync
|
||||
settings:
|
||||
hosts:
|
||||
from_secret: deploy_draft
|
||||
port:
|
||||
from_secret: deploy_port
|
||||
target:
|
||||
from_secret: deploy_target
|
||||
key:
|
||||
from_secret: deploy_key
|
||||
user:
|
||||
from_secret: deploy_user
|
||||
password:
|
||||
from_secret: deploy_secret
|
||||
source: ./public/*
|
||||
recursive: true
|
||||
delete: true
|
||||
script:
|
||||
- chmod -R a+rX www
|
||||
- cd docker
|
||||
- doas docker-compose stop www.donaldharper.com
|
||||
- doas docker-compose up -d www.donaldharper.com
|
||||
secrets: [deploy_key]
|
||||
when:
|
||||
branch: [draft]
|
||||
|
||||
- name: build-prod
|
||||
image: klakegg/hugo:latest-ext
|
||||
commands:
|
||||
- hugo
|
||||
when:
|
||||
branch: [master]
|
||||
|
||||
- name: rsync-prod
|
||||
image: drillster/drone-rsync
|
||||
settings:
|
||||
hosts:
|
||||
from_secret: deploy_host
|
||||
port:
|
||||
from_secret: deploy_port
|
||||
target:
|
||||
from_secret: deploy_target
|
||||
key:
|
||||
from_secret: deploy_key
|
||||
user:
|
||||
from_secret: deploy_user
|
||||
password:
|
||||
from_secret: deploy_secret
|
||||
source: ./public/*
|
||||
recursive: true
|
||||
delete: true
|
||||
script:
|
||||
- chmod -R a+rX www
|
||||
- cd docker
|
||||
- doas docker-compose stop www.donaldharper.com
|
||||
- doas docker-compose up -d www.donaldharper.com
|
||||
secrets: [deploy_key]
|
||||
when:
|
||||
branch: [master]
|
||||
|
|
@ -1 +1,8 @@
|
|||
Source files for www.donaldharper.com
|
||||
# www.donaldharper.com
|
||||
|
||||
Source to the website [www.donaldharper.com](https://www.donaldharper.com)
|
||||
|
||||
## Build Status
|
||||
|
||||
- Main [](https://drone.home.duckland.org/don/www.donaldharper.com)
|
||||
- Draft [](https://drone.home.duckland.org/don/www.donaldharper.com)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue