Skip to content

Commit

Permalink
Try to fix it by adding a dedicated script
Browse files Browse the repository at this point in the history
  • Loading branch information
Lotes committed Aug 22, 2024
1 parent fb0ce61 commit 2ebb312
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Build
run: |
npm install
BASE_URL=/pr-${{ github.event.number }} npm run preview
./hugo/scripts/build.sh production "/pr-${{github.event.number}}"
- name: Upload artifact
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
Expand Down
5 changes: 2 additions & 3 deletions hugo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
"build:worker/sql": "esbuild ./assets/scripts/sql/language-server.ts --bundle --format=iife --outfile=./static/showcase/libs/worker/sqlServerWorker.js",
"build:worker/minilogo": "esbuild ../node_modules/langium-minilogo/out/language-server/main-browser.js --bundle --format=iife --outfile=./static/showcase/libs/worker/minilogoServerWorker.js",
"build:static": "npm run clean:static && npm run build:worker/statemachine && npm run build:worker/domainmodel && npm run build:worker/sql && npm run build:worker/minilogo && npm run build:worker/arithmetics && npm run build:worker/playground-common && npm run build:worker/playground-langium && npm run build:worker/playground-user && npm run copy:monaco-workers",
"preview": "npm run build:static && cross-env NODE_ENV=production hugo --config ./config.toml -b $BASE_URL -d ../public --gc --minify",
"build": "npm run build:static && cross-env NODE_ENV=production hugo --config ./config.toml -b / -d ../public --gc --minify",
"watch": "npm run build:static && cross-env NODE_ENV=development hugo server --config ./config.toml -D -b localhost:1313 -d ../public --appendPort=false",
"build": "./scripts/build.sh production /",
"watch": "npm run build:static && cross-env NODE_ENV=development hugo server --config ./config.toml -D -b localhost:1313 -d ../public --appendPort=false",
"watch:gitpod": "npm run build:static && cross-env NODE_ENV=development hugo server --config ./config.toml -D -b `gp url 1313` -d ../public --appendPort=false"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions hugo/scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cd $(dirname "$0")/..
npm run build:static && npx cross-env NODE_ENV=${1} hugo --config config.toml -b ${2} -d ../public --gc --minify
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"watch": "npm run build --workspace core && concurrently -c gray,blue -k -n hugo,tailwind \"npm run watch --workspace hugo\" \"npm run watch --workspace tailwind\"",
"watch:gitpod": "npm run build --workspace core && concurrently -c gray,blue -k -n hugo,tailwind \"npm run watch:gitpod --workspace hugo\" \"npm run watch --workspace tailwind\"",
"build": "npm run clean && npm run build --workspace core --workspace=tailwind --workspace=hugo",
"preview": "npm run clean && npm run build --workspace core --workspace=tailwind && npm run preview --workspace hugo",
"clean": "shx rm -rf public && npm run clean --workspace core --workspace=tailwind"
},
"devDependencies": {
Expand Down

0 comments on commit 2ebb312

Please sign in to comment.