From 258c1e6ff0fabe23ca5181d80faf75aafc86b245 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Mon, 7 Jul 2025 22:09:36 +0100 Subject: [PATCH] Add build script --- .github/workflows/gh-pages.yml | 9 +-------- README.md | 1 + scripts/build-website.sh | 12 ++++++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100755 scripts/build-website.sh diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 612bb8f..bfa3cf1 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -30,14 +30,7 @@ jobs: - name: Build wasm run: | cargo install wasm-pack - wasm-pack build --target web --features wasm - cd reconcile-js - npm ci - npm run build - cd ../examples/website - npm ci - npm run build - + scripts/build-website.sh - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/README.md b/README.md index b73c375..cab66f3 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,7 @@ Here's the key insight: whilst incorrect merges in source code can introduce dev - **Run tests**: `scripts/test.sh` - **Lint and format**: `scripts/lint.sh` - **Build demo website**: `scripts/dev-website.sh` +- **Build demo website**: `scripts/build-website.sh` - **Publish new version**: `scripts/bump-version.sh patch` TODO: license diff --git a/scripts/build-website.sh b/scripts/build-website.sh new file mode 100755 index 0000000..c55f95f --- /dev/null +++ b/scripts/build-website.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -e + +wasm-pack build --target web --features wasm +cd reconcile-js +npm ci +npm run build +cd ../examples/website +npm ci +npm run build +cd -