File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -33,13 +33,23 @@ jobs:
3333 uses : actions/checkout@v4
3434 - name : Setup Pages
3535 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
3644 - name : Build with Jekyll
3745 uses : actions/jekyll-build-pages@v1
3846 with :
3947 source : ./docs
4048 destination : ./_site
4149 - name : Upload artifact
4250 uses : actions/upload-pages-artifact@v3
51+ with :
52+ path : ./_site
4353
4454 # Deployment job
4555 deploy :
5262 - name : Deploy to GitHub Pages
5363 id : deployment
5464 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