Skip to content

Commit 689a528

Browse files
committed
Purge cache after deployment
1 parent d8c0f38 commit 689a528

2 files changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/cd.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ jobs:
1919
env:
2020
TRAVIS_REPO_SLUG: ascoderu/ascoderu.github.io
2121
GITHUB_TOKEN: ${{ secrets.GH_PAGES_TOKEN }}
22+
CLOUDFLARE_TOKEN: ${{ secrets.CF_API_TOKEN }}

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
"scripts": {
99
"predeploy": "gh-pages-clean",
1010
"deploy": "gh-pages --silent --dist src --branch master --repo \"https://${GITHUB_TOKEN}@github.com/${TRAVIS_REPO_SLUG}\"",
11+
"postdeploy": "cfcli --domain ascoderu.ca --token \"${CLOUDFLARE_TOKEN}\" purge",
1112
"lint.css": "csslint src",
1213
"lint.html": "htmllint src/index.html",
1314
"lint.js": "eslint --max-warnings=0 src/script.js",
1415
"lint": "run-s lint.html lint.css lint.js",
1516
"start": "reload --browser --dir src"
1617
},
1718
"devDependencies": {
19+
"cloudflare-cli": "^4.0.0",
1820
"csslint": "^1.0.5",
1921
"eslint": "^6.3.0",
2022
"gh-pages": "^2.1.1",

0 commit comments

Comments
 (0)