Skip to content

Commit 084ab98

Browse files
committed
Enhance GitHub Actions workflow and VitePress config for improved deployment and consistency
1 parent 56db46a commit 084ab98

2 files changed

Lines changed: 21 additions & 13 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
jobs:
99
deploy:
1010
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
1115

1216
steps:
1317
- name: Checkout code
@@ -19,11 +23,14 @@ jobs:
1923
node-version: 22
2024
cache: 'pnpm'
2125

26+
- name: Install pnpm
27+
run: npm install -g pnpm
28+
2229
- name: Install dependencies
2330
run: pnpm install
2431

2532
- name: Build VitePress
26-
run: pnpm build --base=/docs/
33+
run: pnpm docs:build
2734

2835
- name: Deploy to GitHub Pages
2936
uses: peaceiris/actions-gh-pages@v3

‎.vitepress/config.mts‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
import { defineConfig } from 'vitepress'
1+
import { defineConfig } from "vitepress";
22

33
// https://vitepress.dev/reference/site-config
44
export default defineConfig({
55
title: "Razd Documentation",
66
description: "A documentation site",
7+
base: "/docs/",
78
themeConfig: {
89
// https://vitepress.dev/reference/default-theme-config
910
nav: [
10-
{ text: 'Home', link: '/' },
11-
{ text: 'Examples', link: '/markdown-examples' }
11+
{ text: "Home", link: "/" },
12+
{ text: "Examples", link: "/markdown-examples" },
1213
],
1314

1415
sidebar: [
1516
{
16-
text: 'Examples',
17+
text: "Examples",
1718
items: [
18-
{ text: 'Markdown Examples', link: '/markdown-examples' },
19-
{ text: 'Runtime API Examples', link: '/api-examples' }
20-
]
21-
}
19+
{ text: "Markdown Examples", link: "/markdown-examples" },
20+
{ text: "Runtime API Examples", link: "/api-examples" },
21+
],
22+
},
2223
],
2324

2425
socialLinks: [
25-
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' }
26-
]
27-
}
28-
})
26+
{ icon: "github", link: "https://github.com/vuejs/vitepress" },
27+
],
28+
},
29+
});

0 commit comments

Comments
 (0)