File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,23 @@ jobs:
33
33
uses : actions/checkout@v4
34
34
- name : Setup Pages
35
35
uses : actions/configure-pages@v5
36
+ - name : Generate build timestamp
37
+ id : timestamp
38
+ run : echo "timestamp=$(date +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
39
+ - name : Create cache-busting file
40
+ run : |
41
+ mkdir -p ./docs/assets
42
+ echo "// Cache busting timestamp: ${{ steps.timestamp.outputs.timestamp }}" > ./docs/assets/cache-buster.js
43
+ echo "Cache-Control: no-cache, no-store, must-revalidate" > ./docs/assets/.htaccess
36
44
- name : Build with Jekyll
37
45
uses : actions/jekyll-build-pages@v1
38
46
with :
39
47
source : ./docs
40
48
destination : ./_site
41
49
- name : Upload artifact
42
50
uses : actions/upload-pages-artifact@v3
51
+ with :
52
+ path : ./_site
43
53
44
54
# Deployment job
45
55
deploy :
52
62
- name : Deploy to GitHub Pages
53
63
id : deployment
54
64
uses : actions/deploy-pages@v4
65
+ with :
66
+ # Add cache control headers
67
+ headers : |
68
+ Cache-Control: no-cache, no-store, must-revalidate
69
+ - name : Purge GitHub Pages cache
70
+ run : |
71
+ curl -X PURGE ${{ steps.deployment.outputs.page_url }}
72
+ echo "Attempted to purge GitHub Pages cache"
You can’t perform that action at this time.
0 commit comments