44 push :
55 branches : [gh-pages]
66 paths :
7- - ' web/src/**'
8- - ' web/package.json'
9- - ' web/vite.config.ts'
10- - ' web/index.html'
11- - ' web/tailwind.config.js'
12- - ' .github/workflows/**'
7+ - ' web/**'
8+ paths-ignore :
9+ - ' docs/**'
10+ - ' .github/**'
1311 workflow_dispatch :
1412
1513permissions :
1614 contents : write
1715
18- concurrency :
19- group : ' pages'
20- cancel-in-progress : false
21-
2216jobs :
2317 build-and-deploy :
2418 runs-on : ubuntu-latest
@@ -33,33 +27,25 @@ jobs:
3327 cache : ' npm'
3428 cache-dependency-path : web/package-lock.json
3529
36- - name : Install dependencies
37- working-directory : ./web
38- run : npm ci
39-
40- - name : Run linter
41- working-directory : ./web
42- run : npm run lint
43-
44- - name : Type check
30+ - name : Install and Build
4531 working-directory : ./web
46- run : npm run typecheck
47-
48- - name : Download wheels.json and version.txt from main branch
4932 run : |
50- curl -L -o web/public/wheels.json \
51- "https://raw.githubusercontent.com/wildminder/AI-windows-whl/main/wheels.json"
52- curl -L -o web/public/version.txt \
53- "https://raw.githubusercontent.com/wildminder/AI-windows-whl/main/version.txt" || true
54-
55- - name : Build
56- working-directory : ./web
57- run : npm run build
33+ npm ci
34+ npm run build
5835
59- - name : Commit built files
36+ - name : Update docs folder
6037 run : |
38+ # Ensure latest data is included in the new build
39+ curl -L -o web/dist/wheels.json "https://raw.githubusercontent.com/${{ github.repository }}/main/wheels.json"
40+ curl -L -o web/dist/version.txt "https://raw.githubusercontent.com/${{ github.repository }}/main/version.txt" || true
41+
6142 git config user.name 'github-actions'
6243 git config user.email 'github-actions@github.com'
44+
45+ # Replace docs content with new build
46+ rm -rf docs/*
47+ cp -r web/dist/* docs/
48+
6349 git add docs/
64- git commit -m "Build: Update docs from gh-pages branch [$(date -u +%Y-%m-%d)] " || echo "No changes to commit "
50+ git commit -m "Build: Update website UI " || echo "No changes"
6551 git push
0 commit comments