File tree Expand file tree Collapse file tree 5 files changed +118
-8
lines changed Expand file tree Collapse file tree 5 files changed +118
-8
lines changed Original file line number Diff line number Diff line change @@ -5,24 +5,25 @@ name: Node.js CI
55
66on :
77 push :
8- branches : [master]
8+ branches : [master, main, v3 ]
99 pull_request :
10- branches : [master]
10+ branches : [master, main, v3 ]
1111
1212jobs :
13- build :
13+ test :
1414 runs-on : ubuntu-latest
1515
1616 strategy :
1717 matrix :
18- node-version : [14 .x]
18+ node-version : [16.x, 18.x, 20 .x]
1919
2020 steps :
21- - uses : actions/checkout@v2
21+ - uses : actions/checkout@v4
2222 - name : Use Node.js ${{ matrix.node-version }}
23- uses : actions/setup-node@v2
23+ uses : actions/setup-node@v4
2424 with :
2525 node-version : ${{ matrix.node-version }}
26+ cache : ' npm'
2627 - run : npm ci
2728 - run : npm run build --if-present
2829 - run : npm test
Original file line number Diff line number Diff line change 1+ # GitHub Pages Deployment Workflow
2+ name : Deploy to GitHub Pages
3+
4+ on :
5+ push :
6+ branches : [ v3, main, master ]
7+ workflow_dispatch :
8+
9+ permissions :
10+ contents : read
11+ pages : write
12+ id-token : write
13+
14+ concurrency :
15+ group : " pages"
16+ cancel-in-progress : false
17+
18+ jobs :
19+ build-and-deploy :
20+ runs-on : ubuntu-latest
21+
22+ steps :
23+ - name : Checkout
24+ uses : actions/checkout@v4
25+
26+ - name : Setup Node.js
27+ uses : actions/setup-node@v4
28+ with :
29+ node-version : ' 18'
30+ cache : ' npm'
31+
32+ - name : Install dependencies
33+ run : npm ci
34+
35+ - name : Build the library
36+ run : npm run build
37+
38+ - name : Copy dist files to docs
39+ run : cp -r dist docs/
40+
41+ - name : Setup Pages
42+ uses : actions/configure-pages@v4
43+
44+ - name : Upload artifact
45+ uses : actions/upload-pages-artifact@v3
46+ with :
47+ path : ' ./docs'
48+
49+ - name : Deploy to GitHub Pages
50+ id : deployment
51+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1- theme : jekyll-theme-minimal
1+ # GitHub Pages configuration
2+ # Use docs/ directory for GitHub Pages
3+ # The index.html in docs/ will be served as the main page
4+
5+ # Optional: If you want to use Jekyll theme for other pages
6+ # theme: jekyll-theme-minimal
7+
8+ # GitHub Pages will serve docs/index.html directly
9+ # No Jekyll processing needed for our HTML showcase
Original file line number Diff line number Diff line change 1+ # Tracking Number Validation - Interactive Demo
2+
3+ This directory contains the GitHub Pages showcase for the tracking-number-validation library.
4+
5+ ## 🌐 Live Demo
6+
7+ Visit the live demo at: [ https://niradler.github.io/tracking-number-validation/ ] ( https://niradler.github.io/tracking-number-validation/ )
8+
9+ ## 📁 Contents
10+
11+ - ` index.html ` - The main showcase page with interactive demos
12+ - ` dist/ ` - Built library files (copied from the main build process)
13+
14+ ## 🚀 Features Demonstrated
15+
16+ The interactive demo showcases all the library features:
17+
18+ 1 . ** Basic Validation** - Test tracking numbers and see results
19+ 2 . ** Courier Detection** - Automatically identify shipping carriers
20+ 3 . ** URL Generation** - Get tracking URLs for validated numbers
21+ 4 . ** Bulk Validation** - Validate multiple tracking numbers at once
22+ 5 . ** Pattern Injection** - Add custom patterns to existing couriers
23+ 6 . ** Number Generation** - Generate valid tracking numbers for testing
24+
25+ ## 🔧 Local Development
26+
27+ To run this locally:
28+
29+ 1 . Build the library: ` pnpm build `
30+ 2 . Copy dist files: ` cp -r dist docs/ `
31+ 3 . Serve the docs directory with any static file server
32+
33+ ## 📦 Supported Carriers
34+
35+ The demo supports all 11+ carriers including:
36+ - UPS
37+ - FedEx
38+ - USPS
39+ - DHL
40+ - Amazon
41+ - OnTrac
42+ - Canada Post
43+ - China Post
44+ - Australia Post
45+ - Royal Mail
46+ - And more...
47+
48+ ## 🛠 GitHub Pages Deployment
49+
50+ This site is automatically deployed to GitHub Pages via GitHub Actions whenever changes are pushed to the main branch.
Original file line number Diff line number Diff line change @@ -525,7 +525,7 @@ <h3 class="text-2xl font-bold mb-4">Ready to Get Started?</h3>
525525 </ footer >
526526
527527 <!-- Load the tracking validation library -->
528- < script src =".. /dist/index.js "> </ script >
528+ < script src ="./dist/index.js "> </ script >
529529
530530 <!-- Custom JavaScript for interactivity -->
531531 < script >
You can’t perform that action at this time.
0 commit comments