aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorHarsh Shandilya <msfjarvis@gmail.com>2020-06-12 22:26:40 +0530
committerGitHub <noreply@github.com>2020-06-12 22:26:40 +0530
commitdd8df232fb561ace6b70997f99bf86602f9027dd (patch)
treef30c1398264e359623306ae1c6dcbdc2f045abe4 /.github
parentd8231e112afb501c43041a6f839ab8285f400f77 (diff)
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>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/deploy_snapshot.yml13
1 files changed, 13 insertions, 0 deletions
diff --git a/.github/workflows/deploy_snapshot.yml b/.github/workflows/deploy_snapshot.yml
index 4ec15a2a..55086c17 100644
--- a/.github/workflows/deploy_snapshot.yml
+++ b/.github/workflows/deploy_snapshot.yml
@@ -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 }}