mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-05 07:27:27 +08:00
feat: support github action deploy telegram mini app frontend (#730)
This commit is contained in:
@@ -33,10 +33,17 @@ jobs:
|
|||||||
- name: Deploy Backend for ${{ github.ref_name }}
|
- name: Deploy Backend for ${{ github.ref_name }}
|
||||||
run: |
|
run: |
|
||||||
export use_worker_assets=${{ secrets.USE_WORKER_ASSETS }}
|
export use_worker_assets=${{ secrets.USE_WORKER_ASSETS }}
|
||||||
|
export use_worker_assets_with_telegram=${{ secrets.USE_WORKER_ASSETS_WITH_TELEGRAM }}
|
||||||
if [ -n "$use_worker_assets" ]; then
|
if [ -n "$use_worker_assets" ]; then
|
||||||
cd frontend/
|
cd frontend/
|
||||||
pnpm install --no-frozen-lockfile
|
pnpm install --no-frozen-lockfile
|
||||||
pnpm build:pages
|
if [ -n "$use_worker_assets_with_telegram" ]; then
|
||||||
|
echo "Building with telegram pages"
|
||||||
|
pnpm build:telegram:pages
|
||||||
|
else
|
||||||
|
echo "Building with normal pages"
|
||||||
|
pnpm build:pages
|
||||||
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
"build:pages": "vite build -m pages --emptyOutDir",
|
"build:pages": "vite build -m pages --emptyOutDir",
|
||||||
"build:pages:nopwa": "VITE_PWA_DISABLED=true vite build -m pages --emptyOutDir",
|
"build:pages:nopwa": "VITE_PWA_DISABLED=true vite build -m pages --emptyOutDir",
|
||||||
"build:telegram": "VITE_IS_TELEGRAM=true vite build -m prod --emptyOutDir",
|
"build:telegram": "VITE_IS_TELEGRAM=true vite build -m prod --emptyOutDir",
|
||||||
|
"build:telegram:pages": "VITE_IS_TELEGRAM=true vite build -m pages --emptyOutDir",
|
||||||
"build:telegram:release": "VITE_IS_TELEGRAM=true vite build -m example --emptyOutDir",
|
"build:telegram:release": "VITE_IS_TELEGRAM=true vite build -m example --emptyOutDir",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"deploy:telegram": "npm run build:telegram && wrangler pages deploy ./dist --branch production",
|
"deploy:telegram": "npm run build:telegram && wrangler pages deploy ./dist --branch production",
|
||||||
|
|||||||
Reference in New Issue
Block a user