VCinema/.drone.yml
Jack Hadrill fb76e4eb52
All checks were successful
continuous-integration/drone/push Build is passing
Fix removal of old files upon deploy
2021-01-03 05:53:58 +00:00

27 lines
572 B
YAML

kind: pipeline
type: docker
name: deploy
steps:
- name: build
image: node:lts
commands:
- npm install
- npm run build
- name: deploy
image: alpine
when:
branch:
- master
environment:
USERNAME:
from_secret: ftp_username
PASSWORD:
from_secret: ftp_password
commands:
- apk --no-cache add lftp curl
- cd dist
- 'curl -X DELETE -H "AccessKey: $PASSWORD" https://storage.bunnycdn.com/vcinemaapp/'
- 'lftp -e "mirror -P 10 -R" -u $USERNAME,$PASSWORD storage.bunnycdn.com'