Skip to content

Commit 767b726

Browse files
author
martinmeerAT
committed
Fix: esbuild now properly replaces process.env.NODE_ENV at build time
1 parent 9c3d901 commit 767b726

File tree

4 files changed

+77
-2
lines changed

4 files changed

+77
-2
lines changed

.github/workflows/deploy-github-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Build Marketing Site
4343
working-directory: apps/marketing-site
44-
run: NODE_ENV=production npm run build
44+
run: npm run build
4545
env:
4646
NODE_ENV: production
4747

@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Build Main App
5454
working-directory: apps/main-app
55-
run: NODE_ENV=production npm run build
55+
run: npm run build
5656
env:
5757
NODE_ENV: production
5858

DEPLOYMENT_STATUS.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Deployment Status Check
2+
3+
## Latest Commit
4+
```
5+
24001f2a Enable demo mode for GitHub Pages deployment
6+
```
7+
8+
## What to Check:
9+
10+
### 1. Check if Workflow is Running
11+
Go to: https://github.com/MartinMeer/my-car-tech-tracker-front/actions
12+
13+
Look for "Deploy to GitHub Pages" workflow:
14+
- ⏳ Yellow/Orange = Running
15+
- ✅ Green = Success
16+
- ❌ Red = Failed
17+
18+
### 2. Manually Trigger Deployment
19+
20+
If no workflow is running:
21+
1. Go to: https://github.com/MartinMeer/my-car-tech-tracker-front/actions/workflows/deploy-github-pages.yml
22+
2. Click **"Run workflow"** button (top right)
23+
3. Select branch: **master**
24+
4. Click green **"Run workflow"** button
25+
26+
### 3. Clear Browser Cache
27+
28+
After deployment completes:
29+
- Chrome/Edge: `Ctrl + Shift + R` (Windows) or `Cmd + Shift + R` (Mac)
30+
- Firefox: `Ctrl + F5` (Windows) or `Cmd + Shift + R` (Mac)
31+
32+
Or open in Incognito/Private mode:
33+
- Chrome: `Ctrl + Shift + N`
34+
- Firefox: `Ctrl + Shift + P`
35+
36+
### 4. Check These URLs:
37+
38+
**Marketing Site:**
39+
https://martinmeer.github.io/my-car-tech-tracker-front/
40+
41+
**Main App:**
42+
https://martinmeer.github.io/my-car-tech-tracker-front/app/
43+
44+
### 5. Expected Behavior:
45+
46+
✅ Marketing site loads
47+
✅ Click "Войти" → navigates to login page
48+
✅ Click "Начать бесплатно" → navigates to register page
49+
✅ After login/register → can access main app
50+
✅ Blue "Demo Mode" banner appears at top of main app
51+
✅ Can add cars and data is saved in browser
52+
53+
## Common Issues:
54+
55+
**Problem:** Buttons still don't work
56+
**Solution:**
57+
- Hard refresh (Ctrl+Shift+R)
58+
- Check browser console for errors (F12)
59+
- Try incognito mode
60+
61+
**Problem:** Workflow not running
62+
**Solution:** Manually trigger it (see step 2 above)
63+
64+
**Problem:** Main app shows blank page
65+
**Solution:**
66+
- Check browser console (F12) for errors
67+
- Verify you're on: `https://martinmeer.github.io/my-car-tech-tracker-front/app/`
68+
- Clear cache and try again
69+

apps/main-app/scripts/build.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const esbuildOpts = {
3030
minify: isProd,
3131
treeShaking: true,
3232
jsx: 'automatic',
33+
define: {
34+
'process.env.NODE_ENV': isProd ? '"production"' : '"development"'
35+
},
3336
loader: {
3437
'.html': 'copy',
3538
'.png': 'file',

apps/marketing-site/scripts/build.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ const esbuildOpts = {
3030
minify: isProd,
3131
treeShaking: true,
3232
jsx: 'automatic',
33+
define: {
34+
'process.env.NODE_ENV': isProd ? '"production"' : '"development"'
35+
},
3336
loader: {
3437
'.html': 'copy',
3538
'.png': 'file',

0 commit comments

Comments
 (0)