From a7bdf018146ac87210aeaabb8c896a0c7f2c1c65 Mon Sep 17 00:00:00 2001 From: DirkFi Date: Sat, 12 Oct 2024 20:26:15 -0700 Subject: [PATCH] Add build-ci task and update GitHub Actions workflow for deployment --- .github/workflows/deploy.yml | 2 +- Makefile.toml | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c5da101..fc569dc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,7 +33,7 @@ jobs: # 5. 构建项目 - name: Build project - run: cargo make build + run: cargo make build-ci # 6. 部署到 gh-pages 分支 - name: Deploy to GitHub Pages diff --git a/Makefile.toml b/Makefile.toml index 4f08ba7..c9ca09f 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -12,6 +12,19 @@ args = [ ] watch = { ignore_pattern = "static/*" } +[tasks.build-ci] +command = "wasm-pack" +args = [ + "build", + "--dev", + "--target", + "web", + "--out-name", + "wasm", + "--out-dir", + "./static", +] + [tasks.serve] command = "simple-http-server" args = [