Skip to content

Commit be5c9ac

Browse files
committed
tweak
1 parent e8bb187 commit be5c9ac

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/build-unity-spacecraft.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,42 @@ jobs:
261261
# cacheUnity: true
262262
# cacheVersioning: semantic
263263

264+
- name: Setup Node.js
265+
if: success()
266+
uses: actions/setup-node@v4
267+
with:
268+
node-version: '20'
269+
270+
- name: Install controller dependencies
271+
if: success()
272+
working-directory: WebSites/controller
273+
run: npm ci
274+
275+
- name: Build controller
276+
if: success()
277+
working-directory: WebSites/controller
278+
run: npm run build
279+
280+
- name: Assemble website bundle
281+
if: success()
282+
shell: bash
283+
run: |
284+
set -euo pipefail
285+
OUT_DIR="${{ steps.detect.outputs.projectPath }}/Builds"
286+
echo "[assemble] Output: $OUT_DIR"
287+
mkdir -p "$OUT_DIR/controller"
288+
cp -f WebSites/index.html "$OUT_DIR/index.html"
289+
cp -f WebSites/controller/index.html "$OUT_DIR/controller/index.html"
290+
cp -R WebSites/controller/lib "$OUT_DIR/controller/lib"
291+
cp -R WebSites/controller/build "$OUT_DIR/controller/build"
292+
264293
- name: Upload build artifacts
265294
if: success()
266295
uses: actions/upload-artifact@v4
267296
with:
268297
name: SpaceCraft-${{ inputs.targetPlatform }}-${{ inputs.buildProfile }}
269298
path: |
270-
${{ steps.detect.outputs.projectPath }}/Builds/SpaceCraft
299+
${{ steps.detect.outputs.projectPath }}/Builds
271300
272301
- name: Upload Unity logs (always)
273302
if: always()

0 commit comments

Comments
 (0)