File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Deploy Vite 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
18+ concurrency :
19+ group : " pages"
20+ cancel-in-progress : true
21+
22+ jobs :
23+ # Build job
24+ build :
25+ runs-on : ubuntu-latest
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v4
29+
30+ - name : Setup Node
31+ uses : actions/setup-node@v4
32+ with :
33+ node-version : " 20"
34+ cache : ' npm' # Change to 'yarn' or 'pnpm' if needed
35+
36+ - name : Install dependencies
37+ run : npm ci # Uses package-lock.json for a clean install
38+
39+ - name : Build
40+ run : npm run build
41+
42+ - name : Setup Pages
43+ uses : actions/configure-pages@v5
44+
45+ - name : Upload artifact
46+ uses : actions/upload-pages-artifact@v3
47+ with :
48+ # Upload entire repository
49+ path : ' ./dist' # Verify this matches your vite output folder
50+
51+ # Deployment job
52+ deploy :
53+ environment :
54+ name : github-pages
55+ url : ${{ steps.deployment.outputs.page_url }}
56+ needs : build
57+ runs-on : ubuntu-latest
58+ steps :
59+ - name : Deploy to GitHub Pages
60+ id : deployment
61+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { defineConfig } from 'vitepress'
33// https://vitepress.dev/reference/site-config
44export default defineConfig ( {
55 title : "ROS2 Guide" ,
6+ base : "/Ros2Guide/" ,
67 description : "A comprehensive guide to Robot Operating System 2" ,
78 themeConfig : {
89 // https://vitepress.dev/reference/default-theme-config
You can’t perform that action at this time.
0 commit comments