2022-03-20 17:41:43 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: build
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: install
|
|
|
|
image: node:lts-alpine
|
|
|
|
commands:
|
2022-03-21 19:32:29 +00:00
|
|
|
- apk --no-cache add git
|
2022-03-20 18:59:53 +00:00
|
|
|
- npm install -g typescript
|
2022-03-20 17:41:43 +00:00
|
|
|
- npm install
|
|
|
|
|
|
|
|
- name: build
|
|
|
|
image: node:lts-alpine
|
|
|
|
commands:
|
|
|
|
- npm run build
|
|
|
|
depends_on:
|
|
|
|
- install
|
|
|
|
|
|
|
|
- name: publish
|
2022-03-21 19:32:29 +00:00
|
|
|
image: cschlosser/drone-ftps
|
2022-03-20 17:41:43 +00:00
|
|
|
depends_on:
|
|
|
|
- build
|
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
environment:
|
2022-03-21 19:32:29 +00:00
|
|
|
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:
|
2022-03-20 17:41:43 +00:00
|
|
|
APIKEY:
|
|
|
|
from_secret: api_key
|
|
|
|
commands:
|
2022-03-21 19:32:29 +00:00
|
|
|
- apk --no-cache add curl
|
2022-03-20 17:41:43 +00:00
|
|
|
- 'curl -X POST -H "AccessKey: $APIKEY" https://bunnycdn.com/api/pullzone/733874/purgeCache --data ""'
|