Skip to content

Commit f66a886

Browse files
authored
fix(project): always define FLAT_UA (#1708)
* fix(project): always define FLAT_UA * chore: update ci config
1 parent 575d11e commit f66a886

File tree

6 files changed

+13
-1
lines changed

6 files changed

+13
-1
lines changed

.github/workflows/check-code.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Install changed package dependencies and build packages
3333
run: |-
3434
# failure automatically retries 3 times
35-
pnpm i || pnpm i || pnpm i
35+
pnpm i || pnpm i || pnpm i
3636
3737
- name: Build renderer
3838
run: pnpm -F renderer-app build

.github/workflows/deploy-web-dev-cn.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
deploy-flat-web-dev:
1010
environment: development
11+
env:
12+
FLAT_UA: ${{ secrets.FLAT_UA }}
1113

1214
runs-on: ubuntu-latest
1315

.github/workflows/deploy-web-dev-us.yml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
jobs:
99
deploy-flat-web-dev:
1010
environment: development
11+
env:
12+
FLAT_UA: ${{ secrets.FLAT_UA }}
1113

1214
runs-on: ubuntu-latest
1315

.github/workflows/deploy-web-prod-cn.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
jobs:
99
deploy-flat-web-prod:
1010
environment: production
11+
env:
12+
FLAT_UA: ${{ secrets.FLAT_UA }}
13+
1114
runs-on: ubuntu-latest
1215

1316
steps:

.github/workflows/deploy-web-prod-us.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
jobs:
99
deploy-flat-web-prod:
1010
environment: production
11+
env:
12+
FLAT_UA: ${{ secrets.FLAT_UA }}
13+
1114
runs-on: ubuntu-latest
1215

1316
steps:

packages/flat-vite-plugins/dotenv.js

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ exports.dotenv = function dotenv(envDir) {
1919

2020
if (process.env["FLAT_UA"] !== undefined && process.env["FLAT_UA"] !== "undefined") {
2121
define["process.env.FLAT_UA"] = JSON.stringify(process.env["FLAT_UA"]);
22+
} else {
23+
define["process.env.FLAT_UA"] = "''";
2224
}
2325

2426
if (envConfigContent) {

0 commit comments

Comments
 (0)