File tree Expand file tree Collapse file tree 4 files changed +107
-0
lines changed
Expand file tree Collapse file tree 4 files changed +107
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to GitHub Pages
2+
3+ on :
4+ # Runs on pushes targeting the default branch
5+ push :
6+ branches : ["main"]
7+
8+ # Allows you to run this workflow manually from the Actions tab
9+ workflow_dispatch :
10+
11+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+ permissions :
13+ contents : read
14+ pages : write
15+ id-token : write
16+
17+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+ concurrency :
20+ group : " pages"
21+ cancel-in-progress : false
22+
23+ jobs :
24+ # Build job
25+ build :
26+ runs-on : ubuntu-latest
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v4
30+
31+ - name : Setup Deno
32+ uses : denoland/setup-deno@v1
33+ with :
34+ deno-version : v1.x
35+
36+ - name : Setup Node.js
37+ uses : actions/setup-node@v4
38+ with :
39+ node-version : ' 18'
40+ cache : ' npm'
41+
42+ - name : Install dependencies
43+ run : npm install
44+
45+ - name : Build project
46+ run : npm run build
47+
48+ - name : Setup Pages
49+ uses : actions/configure-pages@v4
50+
51+ - name : Upload artifact
52+ uses : actions/upload-pages-artifact@v3
53+ with :
54+ path : ' ./dist'
55+
56+ # Deployment job
57+ deploy :
58+ environment :
59+ name : github-pages
60+ url : ${{ steps.deployment.outputs.page_url }}
61+ runs-on : ubuntu-latest
62+ needs : build
63+ steps :
64+ - name : Deploy to GitHub Pages
65+ id : deployment
66+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -8,6 +8,41 @@ A static web interface for browsing and managing Neutree model catalog. Built wi
88- 🔍 ** Search & Filter** : Find models by name, task type, or other criteria
99- ✅ ** Multi-Selection** : Select individual models or use bulk selection
1010- 📋 ** YAML Generation** : Generate complete YAML configurations for selected models
11+ - 🚀 ** Auto Deployment** : Automatically deploys to GitHub Pages on push
12+
13+ ## 🚀 Deployment
14+
15+ ### GitHub Pages (Automated)
16+
17+ This project includes GitHub Actions workflow for automatic deployment to GitHub Pages:
18+
19+ 1 . ** Enable GitHub Pages** in your repository settings:
20+
21+ - Go to Settings → Pages
22+ - Set Source to "GitHub Actions"
23+
24+ 2 . ** Push to main branch** - the workflow will automatically:
25+
26+ - Build the project using Deno and npm
27+ - Deploy to GitHub Pages
28+ - Your site will be available at ` https://<username>.github.io/<repository-name> `
29+
30+ 3 . ** Manual deployment** (if needed):
31+ - Go to Actions tab
32+ - Run "Deploy to GitHub Pages" workflow manually
33+
34+ ### Local Development
35+
36+ ``` bash
37+ # Install dependencies
38+ npm install
39+
40+ # Start development server (with file watching)
41+ npm run dev
42+
43+ # Build for production
44+ npm run build
45+ ```
1146
1247## 🎯 How to Use
1348
Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ async function copyFiles() {
9595 await copy ( join ( SRC_DIR , "data.yaml" ) , join ( DIST_DIR , "data.yaml" ) ) ;
9696 }
9797
98+ // Copy .nojekyll file for GitHub Pages
99+ const nojekyllExists = await exists ( join ( SRC_DIR , ".nojekyll" ) ) ;
100+ if ( nojekyllExists ) {
101+ await copy ( join ( SRC_DIR , ".nojekyll" ) , join ( DIST_DIR , ".nojekyll" ) ) ;
102+ }
103+
98104 // Copy any static assets if they exist
99105 const staticDir = join ( SRC_DIR , "static" ) ;
100106 const staticExists = await exists ( staticDir ) ;
You can’t perform that action at this time.
0 commit comments