Skip to content

Commit

Permalink
js and css versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
nor0x committed Sep 12, 2024
1 parent 4c1aea6 commit 1ab774d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
(Get-Content -Path WahlGPT.Common/Settings.cs) -replace 'COUNT_ENDPOINT', '${{ secrets.COUNT_ENDPOINT }}' | Set-Content -Path WahlGPT.Common/Settings.cs
(Get-Content -Path WahlGPT.Common/Settings.cs) -replace 'VERSION_HASH', '${{ github.sha }}' | Set-Content -Path WahlGPT.Common/Settings.cs
$commitHash = '${{ github.sha }}'.Substring(0, 7)
(Get-Content -Path WahlGPT.Web/wwwroot/index.html) -replace 'js/app.js', "js/app.js?version=$commitHash" | Set-Content -Path WahlGPT.Web/wwwroot/index.html
(Get-Content -Path WahlGPT.Web/wwwroot/index.html) -replace 'css/app.css', "css/app.css?version=$commitHash" | Set-Content -Path WahlGPT.Web/wwwroot/index.html
- name: auto minify the files
uses: nizarmah/auto-minify@v3
with:
Expand Down

0 comments on commit 1ab774d

Please sign in to comment.