Skip to content

Commit bee231e

Browse files
MilesChouclaude
andauthored
Upgrade VitePress to 1.6.4 and modernize build pipeline (#44)
* Add .worktrees to .gitignore Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Upgrade VitePress from beta to 1.6.4 and modernize build pipeline - Upgrade vitepress from 1.0.0-beta.1 to 1.6.4 - Move vitepress to devDependencies, add "type": "module" for ESM - Switch from Yarn to npm - Replace deprecated "serve" script with "preview" - Remove duplicate docs:* scripts - Rewrite GitHub Actions to use official deploy-pages action - Add .nvmrc for Node.js 20 - Fix .gitignore comment (vuepress → vitepress) - Add Portainer (GUI) page to sidebar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6814d6b commit bee231e

7 files changed

Lines changed: 2563 additions & 530 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 40 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,51 @@
1-
name: Deploy
1+
name: Deploy VitePress site to Pages
22

33
on:
44
push:
5-
branches:
6-
- master
5+
branches: [master]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
716

817
jobs:
918
build:
1019
runs-on: ubuntu-latest
1120
steps:
1221
- name: Checkout
13-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
1427
with:
15-
submodules: true
28+
node-version: 20
29+
cache: npm
30+
- name: Setup Pages
31+
uses: actions/configure-pages@v4
32+
- name: Install dependencies
33+
run: npm ci
34+
- name: Build with VitePress
35+
run: npm run build
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: .vitepress/dist
1640

17-
- name: vuepress-deploy
18-
uses: jenkey2011/vuepress-deploy@v1.8.1
19-
env:
20-
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21-
TARGET_BRANCH: gh-pages
22-
BUILD_SCRIPT: yarn && yarn build
23-
BUILD_DIR: .vitepress/dist/
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
needs: build
46+
runs-on: ubuntu-latest
47+
name: Deploy
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ Desktop.ini
3030
# Node files
3131
/node_modules
3232

33-
# vuepress dist files
33+
# vitepress dist files
3434
/dist
3535
.vitepress/dist
36-
.vitepress/cache
36+
.vitepress/cache
37+
38+
# Worktrees
39+
.worktrees

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default defineConfig({
1818
{ text: 'Docker Build', link: '/build' },
1919
{ text: 'Multi-stage Build', link: '/multi-stage-build' },
2020
{ text: 'Optimizing Dockerfile', link: '/optimizing-dockerfile' },
21+
{ text: 'Portainer (GUI)', link: '/GUI-portainer' },
2122
]
2223
}
2324
],

0 commit comments

Comments
 (0)