File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4141 - name : Setup Pages
4242 uses : actions/configure-pages@v6
4343
44+ - name : Inject asset version
45+ shell : bash
46+ run : |
47+ set -euo pipefail
48+ VERSION="${GITHUB_SHA::12}"
49+ echo "Using asset version: $VERSION"
50+ find website -type f \( -name "*.html" -o -name "*.js" -o -name "*.css" \) \
51+ -exec sed -i "s/__ASSET_VERSION__/$VERSION/g" {} +
52+
4453 - name : Upload artifact
4554 uses : actions/upload-pages-artifact@v5
4655 with :
Original file line number Diff line number Diff line change 1- import { openHintsDialog } from "./hints-dialog.js" ;
1+ import { openHintsDialog } from "./hints-dialog.js?v=__ASSET_VERSION__ " ;
22
33const cardTemplate = document . getElementById ( "card-template" ) ;
44
Original file line number Diff line number Diff line change 55 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
66 < title > MagicMirror² 3rd Party Modules</ title >
77 < link rel ="icon " type ="image/x-icon " href ="favicon.svg " />
8- < link rel ="stylesheet " href ="index.css " />
8+ < link rel ="stylesheet " href ="index.css?v=__ASSET_VERSION__ " />
99 < link
1010 rel ="stylesheet "
1111 href ="fonts/line-awesome-1.3.0/css/line-awesome.min.css "
@@ -196,6 +196,6 @@ <h3 id="hints-dialog-title"></h3>
196196 </ div >
197197 </ dialog >
198198
199- < script src ="script.js " type ="module "> </ script >
199+ < script src ="script.js?v=__ASSET_VERSION__ " type ="module "> </ script >
200200 </ body >
201201</ html >
Original file line number Diff line number Diff line change 33 < head >
44 < title > Result of the module analysis</ title >
55 < link rel ="icon " type ="image/x-icon " href ="favicon.svg " />
6- < link rel ="stylesheet " href ="result.css " />
6+ < link rel ="stylesheet " href ="result.css?v=__ASSET_VERSION__ " />
77 < script src ="https://cdn.jsdelivr.net/npm/marked/marked.min.js "> </ script >
88 </ head >
99 < body >
Original file line number Diff line number Diff line change 1- import { createCard } from "./card.js" ;
1+ import { createCard } from "./card.js?v=__ASSET_VERSION__ " ;
22
33let allModules = [ ] ;
44let skippedModules = [ ] ;
You can’t perform that action at this time.
0 commit comments