46 lines
928 B
YAML
46 lines
928 B
YAML
kind: pipeline
|
|
type: docker
|
|
name: build
|
|
|
|
steps:
|
|
- name: install
|
|
image: node:lts-alpine
|
|
commands:
|
|
- apk --no-cache add git
|
|
- npm install -g typescript
|
|
- npm install
|
|
|
|
- name: build
|
|
image: node:lts-alpine
|
|
commands:
|
|
- npm run build
|
|
depends_on:
|
|
- install
|
|
|
|
- name: publish
|
|
image: cschlosser/drone-ftps
|
|
depends_on:
|
|
- build
|
|
when:
|
|
branch:
|
|
- master
|
|
environment:
|
|
FTP_USERNAME:
|
|
from_secret: username
|
|
FTP_PASSWORD:
|
|
from_secret: password
|
|
hostname: uk.storage.bunnycdn.com:21
|
|
secure: false
|
|
src_dir: ./dist
|
|
clean_dir: true
|
|
|
|
- name: clear-cache
|
|
image: alpine
|
|
depends_on:
|
|
- publish
|
|
environment:
|
|
APIKEY:
|
|
from_secret: api_key
|
|
commands:
|
|
- apk --no-cache add curl
|
|
- 'curl -X POST -H "AccessKey: $APIKEY" https://bunnycdn.com/api/pullzone/733874/purgeCache --data ""' |