Skip to content

Commit 61313c5

Browse files
committed
2 parents f3fc84a + d096a8a commit 61313c5

File tree

6 files changed

+1117
-16
lines changed

6 files changed

+1117
-16
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ jobs:
2424
hugo-version: "latest"
2525
extended: true
2626

27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 20
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
2735
- name: Build
2836
if: ${{ inputs.preview == false }}
2937
run: hugo --minify --source ./src --destination ${{ github.workspace }}/${{ env.OUTPUT_FOLDER }} --config config.toml,config.speaking.toml
@@ -32,6 +40,10 @@ jobs:
3240
if: ${{ inputs.preview == true }}
3341
run: hugo --minify --source ./src --destination ${{ github.workspace }}/${{ env.OUTPUT_FOLDER }} --config config.toml,config.speaking.toml --buildDrafts --buildFuture --baseURL '/'
3442

43+
- name: Compress generated images
44+
if: success()
45+
run: node ./scripts/compress-images.js --input "${{ github.workspace }}/${{ env.OUTPUT_FOLDER }}"
46+
3547
- name: Publish website output
3648
uses: actions/upload-artifact@v4
3749
with:

.vscode/tasks.json

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,30 @@
9393
],
9494
"problemMatcher": []
9595
},
96+
{
97+
"label": "compress images (static)",
98+
"type": "shell",
99+
"command": "npm",
100+
"args": [
101+
"run",
102+
"compress:images"
103+
],
104+
"problemMatcher": []
105+
},
106+
{
107+
"label": "compress images (output)",
108+
"type": "shell",
109+
"command": "npm",
110+
"args": [
111+
"run",
112+
"compress:output"
113+
],
114+
"dependsOn": [
115+
"build:debug (hugo)"
116+
],
117+
"dependsOrder": "sequence",
118+
"problemMatcher": []
119+
},
96120
{
97121
"label": "build (dotnet)",
98122
"command": "dotnet",
@@ -152,7 +176,7 @@
152176
"label": "build",
153177
"dependsOn": [
154178
"publish (search)",
155-
"build:debug (hugo)"
179+
"compress images (output)"
156180
],
157181
"group": {
158182
"isDefault": true,

0 commit comments

Comments
 (0)