From 9ee04e5a741340785bc12eba4baedc03f991317f Mon Sep 17 00:00:00 2001 From: Jack Hadrill Date: Mon, 18 Jan 2021 19:55:28 +0000 Subject: [PATCH] Add staging deployment --- .drone.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.drone.yml b/.drone.yml index 8f0029b..0047fb4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -27,3 +27,22 @@ steps: - 'curl -X DELETE -H "AccessKey: $PASSWORD" https://storage.bunnycdn.com/vcinemaapp/' - 'lftp -e "mirror -P 10 -R" -u $USERNAME,$PASSWORD storage.bunnycdn.com' - 'curl -X POST -H "AccessKey: $APIKEY" https://bunnycdn.com/api/pullzone/233440/purgeCache --data ""' + + - name: deploy + image: alpine + when: + branch: + - develop + environment: + USERNAME: + from_secret: staging_ftp_username + PASSWORD: + from_secret: staging_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/vcinemaapp/' + - 'lftp -e "mirror -P 10 -R" -u $USERNAME,$PASSWORD storage.bunnycdn.com' + - 'curl -X POST -H "AccessKey: $APIKEY" https://bunnycdn.com/api/pullzone/244774/purgeCache --data ""'