diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3faa4291..9a6804ee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,7 +100,6 @@ jobs: - name: Upload to Aliyun OSS (CN) run: | ${{github.workspace}}/ossutil cp ./dist/ oss://lb-assets/github/release/open.longbridge.cn/new-docs/raw/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --exclude "*.html" --exclude "*.md" --exclude "*.txt" --exclude "*.zip" --meta=Cache-Control:max-age=31536000 - ${{github.workspace}}/ossutil cp ./dist/ oss://lb-assets/github/release/open.longbridge.com/new-docs/raw/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --exclude "*.html" --exclude "*.md" --exclude "*.txt" --exclude "*.zip" --meta=Cache-Control:max-age=31536000 ${{github.workspace}}/ossutil cp ./dist/ oss://lb-assets/github/release/open.longbridge.cn/new-docs/raw/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --include "*.zip" --meta "Cache-Control:no-cache#Content-type:application/zip;charset=utf-8" ${{github.workspace}}/ossutil cp ./dist oss://lb-assets/github/release/open.longbridge.cn/new-docs/raw/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --include "*.md" --meta "Cache-Control:no-cache#Content-type:text/markdown;charset=utf-8" ${{github.workspace}}/ossutil cp ./dist oss://lb-assets/github/release/open.longbridge.cn/new-docs/raw/ -u -r -j 10 -e oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.FE_LB_ASSET_ACCESS_KEY_ID }} -k ${{ secrets.FE_LB_ASSET_ACCESS_KEY_SECRET }} --include "*.txt" --meta "Cache-Control:no-cache#Content-type:text/plain;charset=utf-8" diff --git a/package.json b/package.json index 420d92cf..417c7acb 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "dev:cn": "cross-env VITE_REGION=cn VITE_API_BASE_URL=https://openapi.longbridge.cn VITE_SITE_HOSTNAME=https://open.longbridge.cn astro dev", "build:canary": "cross-env \"NODE_OPTIONS=--max-old-space-size=14336 --expose-gc\" PROXY=canary VITE_API_BASE_URL=https://openapi.longbridge.xyz astro check && astro build && bunx pagefind --site dist && bun run scripts/copy-routes.ts", "build:release": "cross-env \"NODE_OPTIONS=--max-old-space-size=14336 --expose-gc\" VITE_API_BASE_URL=https://openapi.longbridge.com astro check && astro build && bunx pagefind --site dist && bun run scripts/copy-routes.ts", - "build:cn": "cross-env \"NODE_OPTIONS=--max-old-space-size=14336 --expose-gc\" VITE_REGION=cn VITE_API_BASE_URL=https://openapi.longbridge.cn VITE_PORTAL_GATEWAY_BASE_URL=https://mr.lbkrs.com VITE_SITE_HOSTNAME=https://open.longbridge.cn astro check && astro build && bunx pagefind --site dist && bun run scripts/copy-routes.ts", + "build:cn": "cross-env \"NODE_OPTIONS=--max-old-space-size=14336 --expose-gc\" VITE_REGION=cn VITE_API_BASE_URL=https://openapi.longbridge.cn VITE_PORTAL_GATEWAY_BASE_URL=https://mr.lbkrs.com VITE_SITE_HOSTNAME=https://open.longbridge.cn sh -c 'astro check && astro build && bunx pagefind --site dist && bun run scripts/copy-routes.ts'", "build:llms": "bun run scripts/normalize_md.ts && bun run scripts/generate-llms.ts", "build:copy-routes": "bun run scripts/copy-routes.ts", "lint": "oxlint", diff --git a/src/components/shell/TopNav.tsx b/src/components/shell/TopNav.tsx index 5ab707ce..92ce3541 100644 --- a/src/components/shell/TopNav.tsx +++ b/src/components/shell/TopNav.tsx @@ -76,7 +76,7 @@ export default function TopNav({ locale, pathname: initialPath = '/' }: Props) { }, []) const navItems = navForLocale(locale) // CN region hides Pricing / Docs / the Features menu (legacy CN_HIDDEN_KEYS). - const isCnRegion = import.meta.env.VITE_REGION === 'cn' + const isCnRegion = import.meta.env.PUBLIC_REGION === 'cn' const CN_HIDDEN_LINKS = new Set(['/pricing', '/docs']) const visibleNavItems = isCnRegion ? navItems.filter((n) => !n.link || !CN_HIDDEN_LINKS.has(n.link))