diff --git a/.drone.yml b/.drone.yml index c2e5e50..8d579ac 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,7 +6,7 @@ steps: - name: install image: node:lts-alpine commands: - - apk add git + - apk --no-cache add git - npm install -g typescript - npm install @@ -18,22 +18,29 @@ steps: - install - name: publish - image: alpine + image: cschlosser/drone-ftps depends_on: - build when: branch: - master environment: - USERNAME: - from_secret: ftp_username - PASSWORD: - from_secret: ftp_password + 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: 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' + - apk --no-cache add curl - 'curl -X POST -H "AccessKey: $APIKEY" https://bunnycdn.com/api/pullzone/733874/purgeCache --data ""' \ No newline at end of file