From 550329c3aac664b6bfbc9b342a47a0e314f8d123 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Fri, 30 Aug 2024 15:15:39 +0800 Subject: [PATCH] Refactor build and deployment workflow for web and API integration --- .github/workflows/publish.yml | 3 -- api/.gitignore | 3 +- api/static/index.html | 81 ----------------------------------- web/rsbuild.config.ts | 5 +++ 4 files changed, 7 insertions(+), 85 deletions(-) delete mode 100644 api/static/index.html diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f1c4602e..909ed8c3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -19,9 +19,6 @@ jobs: npm install npm run build working-directory: web - - name: copy to api/static - run: | - cp -R web/dist/* api/static/ - name: Set up Go uses: actions/setup-go@v3 with: diff --git a/api/.gitignore b/api/.gitignore index 95669295..80e9c64a 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -1,4 +1,5 @@ tmp/ chat_backend env.sh -static/static \ No newline at end of file +static/static +static/index.html \ No newline at end of file diff --git a/api/static/index.html b/api/static/index.html deleted file mode 100644 index 5e64a3a0..00000000 --- a/api/static/index.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - Chat - - - -
- -
-
-
-
-
-
-
-
- - - diff --git a/web/rsbuild.config.ts b/web/rsbuild.config.ts index 4fa84851..d429880f 100644 --- a/web/rsbuild.config.ts +++ b/web/rsbuild.config.ts @@ -11,6 +11,11 @@ export default defineConfig({ index: './src/main.ts', }, }, + output: { + distPath: { + root: '../api/static/', + } + }, plugins: [ pluginVue(), pluginLess(),