Tools

CI/CD

Blog

Pipeline

.drone.yml

kind: pipeline
type: docker
name: default

# default clone doesn't recursive
clone:
  disable: true

steps:
- name: clone-with-submodules
  image: plugins/git
  pull: if-not-exists
  settings:
    depth: 50
    recursive: true

- name: build
  image: klakegg/hugo
  pull: if-not-exists
  commands:
    - hugo 

- name: deploy
  image: drillster/drone-rsync
  settings:
    user: 
      from_secret: deploy-blog-user
    hosts: 
      from_secret: deploy-blog-host
    key:
      from_secret: deploy-blog-key
    source: ./public
    target: /home/www/releases/${DRONE_BUILD_NUMBER}
    script:
      - ln -sfn /home/www/releases/${DRONE_BUILD_NUMBER}/public /home/www/b
  when:
    branch:
      include:
        - master
trigger:
  branch:
  - master
  - dev

Badge

Build Status