---
kind: pipeline
name: default
steps:
- name: restore-cache
image: drillster/drone-volume-cache
volumes:
- name: cache
path: /cache
settings:
restore: true
mount:
- ./node_modules
- name: dependencies
image: node
failure: ignore
commands:
- yarn
depends_on:
- restore-cache
- name: lint
- yarn lint
- dependencies
- name: build_versioned
- yarn build
environment:
SUBPATH: /${DRONE_COMMIT_SHA:0:8}
when:
event:
- push
branch:
exclude:
- master
- name: build_pr
SUBPATH: /pr-${DRONE_PULL_REQUEST}
- pull_request
- name: build_master
SUBPATH: /latest
- name: upload_build_versioned
image: plugins/s3
bucket: tghandbook
access_key:
from_secret: minio_access
secret_key:
from_secret: minio_secret
source: dist/**/*
target: /${DRONE_COMMIT_SHA:0:8}/
path_style: true
endpoint: https://artifacts.fromouter.space
- build_versioned
- name: upload_build_pr
target: /pr-${DRONE_PULL_REQUEST}/
- build_pr
- name: upload_build_master
target: /latest/
- build_master
- name: rebuild-cache
rebuild: true
host:
path: /opt/gitea/drone-cache/hamcha/tghandbook
kind: signature
hmac: bf5b70e01799ced73502bdb7b7296e4a4d3d32696af2dee54866d2cc24581f1d