Skip to content

Commit ff81429

Browse files
committed
last test
1 parent 2b698cf commit ff81429

File tree

3 files changed

+29
-40
lines changed

3 files changed

+29
-40
lines changed

.github/workflows/deploy.yml

Lines changed: 23 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,56 @@
1-
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2-
#
3-
name: Deploy VitePress site to Pages
1+
name: Deploy docs to GitHub Pages
42

53
on:
6-
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
7-
# using the `master` branch as the default branch.
84
push:
9-
branches: [1.21-rework]
10-
11-
# Allows you to run this workflow manually from the Actions tab
5+
branches:
6+
- main
7+
- 1.21-rework
128
workflow_dispatch:
139

14-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1510
permissions:
1611
contents: read
1712
pages: write
1813
id-token: write
1914

20-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
21-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2215
concurrency:
23-
group: pages
24-
cancel-in-progress: false
16+
group: "pages"
17+
cancel-in-progress: true
2518

2619
jobs:
27-
# Build job
2820
build:
2921
runs-on: ubuntu-latest
3022
steps:
3123
- name: Checkout
32-
uses: actions/checkout@v5
33-
with:
34-
fetch-depth: 0 # Not needed if lastUpdated is not enabled
35-
# - uses: pnpm/action-setup@v4 # Uncomment this block if you're using pnpm
36-
# with:
37-
# version: 9 # Not needed if you've set "packageManager" in package.json
38-
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
39-
- name: Setup Node
40-
uses: actions/setup-node@v6
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
4128
with:
42-
node-version: 24
43-
cache: npm # or pnpm / yarn
44-
- name: Setup Pages
45-
uses: actions/configure-pages@v4
29+
node-version: 20
30+
cache: 'npm'
31+
4632
- name: Install dependencies
47-
run: npm ci # or pnpm install / yarn install / bun install
48-
- name: Build with VitePress
49-
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
50-
- name: Check the files structure
51-
run: tree
33+
run: npm ci
34+
35+
- name: Build VitePress site
36+
run: npm run docs:build
37+
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v5
5240

5341
- name: Upload artifact
5442
uses: actions/upload-pages-artifact@v3
5543
with:
5644
path: docs/.vitepress/dist
5745

58-
# Deployment job
5946
deploy:
6047
environment:
6148
name: github-pages
6249
url: ${{ steps.deployment.outputs.page_url }}
63-
needs: build
6450
runs-on: ubuntu-latest
65-
name: Deploy
51+
needs: build
6652
steps:
6753
- name: Deploy to GitHub Pages
6854
id: deployment
69-
uses: actions/deploy-pages@v4
55+
uses: actions/deploy-pages@v4
56+

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,6 @@ common/build
4747

4848
docs/node_modules/*
4949
docs/.vitepress/cache
50-
node_modules/
50+
docs/.vitepress/dist
51+
node_modules/
52+
.vitepress

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"scripts": {
3-
"docs:dev": "node_modules/.bin/vitepress dev",
4-
"docs:build": "node_modules/.bin/vitepress build",
5-
"docs:preview": "node_modules/.bin/vitepress preview"
3+
"docs:dev": "vitepress dev",
4+
"docs:build": "vitepress build",
5+
"docs:preview": "vitepress preview"
66
},
77
"devDependencies": {
88
"vitepress": "^2.0.0-alpha.13"

0 commit comments

Comments
 (0)