github: add flow to purge Cloudflare cache after snapshot deploy (#848)
This will ensure that APKs served from Cloudflare's edge will always be fresh. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
d8231e112a
commit
dd8df232fb
1 changed files with 13 additions and 0 deletions
13
.github/workflows/deploy_snapshot.yml
vendored
13
.github/workflows/deploy_snapshot.yml
vendored
|
@ -66,3 +66,16 @@ jobs:
|
|||
SERVER_ADDRESS: ${{ secrets.SERVER_ADDRESS }}
|
||||
SERVER_DESTINATION: ${{ secrets.SERVER_DESTINATION }}
|
||||
SSH_PORT: ${{ secrets.SSH_PORT }}
|
||||
|
||||
- name: Install NodeJS
|
||||
uses: actions/setup-node@v2-beta
|
||||
with:
|
||||
node-version: '12'
|
||||
|
||||
- name: Install cfcli
|
||||
run: npm install -g cloudflare-cli
|
||||
|
||||
- name: Purge Cloudflare cache
|
||||
run: cfcli --token ${CF_TOKEN} purge "https://dl.msfjarvis.dev/APS/$(cd ./app/build/outputs/apk/release/; ls *.apk)"
|
||||
env:
|
||||
CF_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
|
|
Loading…
Reference in a new issue