Add CI
This commit is contained in:
38
.drone.yml
Normal file
38
.drone.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: build
|
||||
|
||||
steps:
|
||||
- name: install
|
||||
image: node:lts-alpine
|
||||
commands:
|
||||
- apk add git
|
||||
- npm install
|
||||
|
||||
- name: build
|
||||
image: node:lts-alpine
|
||||
commands:
|
||||
- npm run build
|
||||
depends_on:
|
||||
- install
|
||||
|
||||
- name: publish
|
||||
image: alpine
|
||||
depends_on:
|
||||
- build
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
environment:
|
||||
USERNAME:
|
||||
from_secret: ftp_username
|
||||
PASSWORD:
|
||||
from_secret: ftp_password
|
||||
APIKEY:
|
||||
from_secret: api_key
|
||||
commands:
|
||||
- apk --no-cache add lftp curl
|
||||
- cd dist
|
||||
- 'curl -X DELETE -H "AccessKey: $PASSWORD" https://storage.bunnycdn.com/mercuryapp/'
|
||||
- 'lftp -e "mirror -P 10 -R" -u $USERNAME,$PASSWORD storage.bunnycdn.com'
|
||||
- 'curl -X POST -H "AccessKey: $APIKEY" https://bunnycdn.com/api/pullzone/733874/purgeCache --data ""'
|
||||
Reference in New Issue
Block a user