From 6421b6b0c3c6644607e085559415c2d3cdf7cd21 Mon Sep 17 00:00:00 2001 From: BrendanEichDisciple Date: Fri, 9 Aug 2024 10:01:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=85=8D=E7=BD=AE=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=AD=90=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 ++ .env.production | 2 ++ .github/workflows/main.yml | 2 +- .gitignore | 3 +-- vite.config.js | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .env.development create mode 100644 .env.production diff --git a/.env.development b/.env.development new file mode 100644 index 0000000..ad9e870 --- /dev/null +++ b/.env.development @@ -0,0 +1,2 @@ +VITE_BASE=/ +VITE_BASE_URL=http://localhost:3000/api/v1 \ No newline at end of file diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..1154699 --- /dev/null +++ b/.env.production @@ -0,0 +1,2 @@ +VITE_BASE=/hospital/ +VITE_BASE_URL=http://localhost:3000/api/v1 \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 224e970..a04b266 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ jobs: uses: easingthemes/ssh-deploy@main with: SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} - ARGS: '-rlgoDzvc -i --delete' + ARGS: '-rlgoDzvc -i' SOURCE: 'package.json build/' REMOTE_HOST: ${{ secrets.REMOTE_HOST }} REMOTE_USER: ${{ secrets.REMOTE_USER }} diff --git a/.gitignore b/.gitignore index 6635cf5..91a02dc 100644 --- a/.gitignore +++ b/.gitignore @@ -3,8 +3,7 @@ node_modules /build /.svelte-kit /package -.env -.env.* +*.local !.env.example vite.config.js.timestamp-* vite.config.ts.timestamp-* diff --git a/vite.config.js b/vite.config.js index 43920c0..f46d10d 100644 --- a/vite.config.js +++ b/vite.config.js @@ -6,6 +6,7 @@ import dotenv from 'dotenv'; dotenv.config(); export default defineConfig({ + base: process.env.VITE_BASE || '/', plugins: [sveltekit()], server: { proxy: {