wiki/.drone.yml
Peter Stuifzand 5859046169
All checks were successful
continuous-integration/drone/push Build is passing
Add list-editor steps in .drone.yml
2020-10-25 15:52:39 +01:00

85 lines
1.7 KiB
YAML

kind: pipeline
name: default
workspace:
base: /go
path: src/p83.nl/go/wiki
steps:
- name: testing
image: golang:1.13-alpine
commands:
- export GOPATH=/go
- export CGO_ENABLED=0
- apk --no-cache add git
- go get -d -t ./...
- go build ./...
- go test ./...
# - name: restore-cache
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# restore: true
# file: node-cache.tar
# mount:
# - ./editor/node_modules
- name: build-node
image: node
group: build
commands:
- cd list-editor
- npm install
- cd ../editor
- npm install
- npm run docker
# - name: rebuild-cache
# image: drillster/drone-volume-cache
# volumes:
# - name: cache
# path: /cache
# settings:
# rebuild: true
# file: node-cache.tar
# mount:
# - ./editor/node_modules
- name: publish
image: plugins/docker
settings:
repo: registry.stuifzandapp.com/wiki
registry: registry.stuifzandapp.com
username:
from_secret: docker_username
password:
from_secret: docker_password
- name: deploy
image: appleboy/drone-ssh
settings:
host: wiki.p83.nl
username: wiki
ssh_key:
from_secret: ssh_key
script:
- cd /home/wiki/wiki
- docker-compose pull web
- docker-compose up -d
# - name: notify
# image: plugins/webhook
# settings:
# debug: true
# secrets:
# - source: result_webhook
# target: plugin_urls
volumes:
- name: cache
host:
path: /tmp