Skip to content

Commit

Permalink
💥 feat(login): support run in local (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwnmengjing committed Jul 22, 2024
1 parent 68d482d commit d9769d4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ jobs:
- name: Install Dependencies
run: pnpm install

- name: Build for run local
run: pnpm build:local

- name: Pack dist for run local
run: tar -czvf dist-local.tar.gz dist

- name: Build
run: |
rm -rf dist
rm -rf config/config.prod.*
pnpm build
Expand All @@ -51,6 +58,7 @@ jobs:
generate_release_notes: true
files: |
dist.tar.gz
dist-local.tar.gz
prerelease: false
body: |
## Pull Image
Expand Down
8 changes: 8 additions & 0 deletions config/config.prod.local.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://umijs.org/config/
import { defineConfig } from '@umijs/max';

export default defineConfig({
define: {
API_URL: 'http://localhost:8080',
},
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"analyze": "cross-env ANALYZE=1 max build",
"build": "max build",
"build:local": "cross-env REACT_APP_ENV=local UMI_ENV=local max build",
"build:alpha": "cross-env REACT_APP_ENV=alpha UMI_ENV=alpha max build",
"build:beta": "cross-env REACT_APP_ENV=beta UMI_ENV=beta max build",
"build:prod": "cross-env REACT_APP_ENV=prod UMI_ENV=prod max build",
Expand Down

0 comments on commit d9769d4

Please sign in to comment.