DS Prototype Template deploys to GitHub Pages automatically via GitHub Actions on every push to master.
- GitHub account with repository access
- Node.js 20+ installed locally
- Git installed and configured
@ankorstore/design-systemaccess (Artifactory token)JF_NPM_TOKENorg-level secret accessible to the repo
# Click "Use this template" on GitHub to create your own repo
# Then clone locally:
git clone https://github.com/YOUR-USERNAME/YOUR-REPO.git
cd YOUR-REPO
# Install dependencies
npm install
# Start dev server to verify setup
npm run dev
# Visit http://localhost:3000Configure Pages to use GitHub Actions as the source:
gh api repos/OWNER/REPO/pages -X PUT -f build_type="workflow"Or manually: Settings → Pages → Source → "GitHub Actions"
Push to master — deployment is automatic:
git add .
git commit -m "feat: add new prototype"
git push origin masterOr trigger manually: gh workflow run deploy-pages.yml
Result: Live at the URL shown in Settings → Pages
npm run dev
# Starts Vite dev server on http://localhost:3000
# Hot reload enabled; changes appear instantlynpm run build
# Runs: vue-tsc --noEmit && vite build
# Reports all type errors before deploymentnpm run preview
# Builds production bundle and serves locally
# Use to verify build output before pushingnpm run build-
Type Check —
vue-tsc --noEmit- Validates all TypeScript
- Reports errors; stops if issues found
-
Production Build —
vite build- Compiles Vue components to JavaScript
- Minifies CSS and JavaScript
- Creates hash-based asset names for cache busting
- Outputs to
dist/directory
-
Output Files
dist/ ├── index.html # Main entry point (never cached) ├── .nojekyll # Disables Jekyll processing ├── assets/ │ ├── index-XXXX.js # Main app bundle (hashed) │ ├── style-XXXX.css # Combined styles (hashed) │ └── ... └── (static assets from public/)
- Type checking: ~2 seconds
- Vite build: ~5 seconds
- Total: < 10 seconds
The .github/workflows/deploy-pages.yml workflow handles deployment:
- Triggers on push to
masteror manualworkflow_dispatch - Installs dependencies (using
JF_NPM_TOKENorg secret for Artifactory) - Builds the project (
npm run build) - Uploads
dist/as a Pages artifact - Deploys to GitHub Pages via
actions/deploy-pages
First-time setup:
# Enable Pages with GitHub Actions source
gh api repos/OWNER/REPO/pages -X PUT -f build_type="workflow"The npm run deploy script is still available for local deployment:
npm run deploy
# Runs: npm run build && gh-pages -d dist --dotfiles- Go to Settings → Pages
- Under "Custom domain", enter your domain
- Add DNS record pointing to GitHub Pages IP
Default: Site is served at the root of the Pages domain.
In Code: Vite base is / by default. Vue Router uses import.meta.env.BASE_URL.
- Click Code → Codespaces → Create codespace on main
- Wait for environment initialization (~2 minutes)
Before npm install, set your Artifactory token:
npm config set //ankorstore.jfrog.io/artifactory/api/npm/npm-virtual/:_auth <YOUR_TOKEN>- Go to Settings → Secrets and variables → Codespaces
- Create new secret:
NPM_TOKEN= your Artifactory token
npm install
npm run dev
# Port 3000 is automatically forwardedNone required for standard deployment. The GitHub Actions workflow handles everything.
None required. This is a static prototype; no API keys or secrets needed.
| Secret | Level | Purpose |
|---|---|---|
JF_NPM_TOKEN |
Org | Artifactory auth for @ankorstore/design-system |
Error: error TS2339: Property 'xyz' does not exist on type 'Order'
Fix:
- Check
src/data/types.ts— is interface correct? - Check JSON fixture — does it match interface?
- Run
npm run buildto verify
Error: error TS2307: Cannot find module '@/data/xyz'
Fix:
- Verify file path:
/src/data/xyz.jsonexists - Check import path:
import x from '@/data/xyz.json'
Cause: JF_NPM_TOKEN org secret not accessible to this repo.
Fix: Ask an org admin to grant the repo access to the JF_NPM_TOKEN secret.
Cause: Jekyll processing ignores files/directories starting with _.
Fix: Ensure public/.nojekyll exists. This file is copied to dist/ during build.
Check:
- Verify workflow completed:
gh run list --workflow=deploy-pages.yml --limit 1 - Verify Pages source is "GitHub Actions": Settings → Pages
- Wait 1-2 minutes for GitHub Pages CDN to update
Fix:
- Hard refresh (Ctrl+Shift+R)
- Check browser console (F12) for errors
Cause: GitHub Pages doesn't know about Vue Router routes.
Fix: Create dist/404.html that copies index.html. Vue Router takes over client-side.
Common causes:
- Old
@ankorstore/design-systemin node_modules →npm update @ankorstore/design-system - Browser cache → hard refresh
# Via GitHub CLI
gh run list --workflow=deploy-pages.yml --limit 20
# Via GitHub UI
# Go to repository → Actions → "Deploy to GitHub Pages"# Re-run a previous successful workflow
gh run rerun <run-id>
# Or revert changes and push
git revert HEAD
git push origin masterGitHub Pages CDN caches:
assets/index-XXXX.js— cached forever (hash in name)assets/style-XXXX.css— cached forever (hash in name)index.html— never cached (always fresh)
Already configured:
- Tree-shaking, code splitting, CSS/JS minification
- Asset hashing:
assets/[name]-[hash].js
Last Updated: 2026-03-27 Deployment Platform: GitHub Pages (CDN-served static assets) Deployment Method: GitHub Actions (automatic on push to master)