--- name: deploy-frontend description: Build frontend and deploy to prod server via Y drive --- Build the Vue 3 frontend with production settings and copy to the Y drive for prod server deployment. ## Steps 1. Navigate to frontend directory: ``` cd C:\Users\270015376\Documents\github\flask-shopdb\frontend ``` 2. Run production build: ``` build-prod.cmd ``` This runs `npm run build` with `VITE_BASE_PATH=/shopdb/` environment variable. 3. Verify build output: ``` ls -lh dist/ ``` Should see index.html, assets/, and other bundled files. 4. Copy to Y drive (prod server): ``` update-prod-server.cmd ``` This copies frontend/dist/ to Y:/frontend/ (the SMB share that syncs to prod). 5. Restart IIS app pool on prod server: - Connect to prod server - Restart "ShopDB" application pool - Or use remote command if configured ## Files and Paths **Work PC (this machine)**: - Source: `C:\Users\270015376\Documents\github\flask-shopdb\frontend` - Build output: `frontend/dist/` **Y Drive (SMB share)**: - Target: `Y:/frontend/` - This is the staging area that syncs to prod **Prod Server**: - Final location: `/shopdb/` (served by IIS) - Access via: `https://tsgwp00525.wjs.geaerospace.net/shopdb/` ## Important Notes - Frontend must be built on THIS PC (work PC has the right environment) - Build output goes to frontend/dist/ - Y: drive is an SMB share mounted on this machine - After copy to Y:, restart the IIS app pool on prod server - Always test after deployment by loading the shopdb webpage ## Common Issues - **White screen**: Frontend build path wrong, check VITE_BASE_PATH - **Assets not loading**: Check dist/ was fully copied to Y: - **Stale cache**: Hard refresh browser (Ctrl+F5) ## Deployment Workflow 1. Make frontend changes 2. Commit to git 3. Run this skill to build and deploy 4. Restart IIS app pool 5. Test in browser