VCinema/.drone.yml

30 lines
737 B
YAML
Raw Normal View History

2021-01-03 05:20:19 +00:00
kind: pipeline
type: docker
name: deploy
steps:
- name: build
2021-01-03 05:30:27 +00:00
image: node:lts
2021-01-03 05:20:19 +00:00
commands:
- npm install
2021-01-05 04:08:45 +00:00
- npm run build --production
2021-01-03 05:20:19 +00:00
- name: deploy
image: alpine
when:
branch:
- master
environment:
USERNAME:
from_secret: ftp_username
PASSWORD:
from_secret: ftp_password
2021-01-03 19:26:28 +00:00
APIKEY:
from_secret: api_key
2021-01-03 05:20:19 +00:00
commands:
2021-01-03 05:33:35 +00:00
- apk --no-cache add lftp curl
2021-01-03 05:30:27 +00:00
- cd dist
2021-01-03 05:33:35 +00:00
- 'curl -X DELETE -H "AccessKey: $PASSWORD" https://storage.bunnycdn.com/vcinemaapp/'
- 'lftp -e "mirror -P 10 -R" -u $USERNAME,$PASSWORD storage.bunnycdn.com'
2021-01-03 19:26:28 +00:00
- 'curl -X POST -H "AccessKey: $APIKEY" https://bunnycdn.com/api/pullzone/233440/purgeCache --data ""'