Skip to content

Commit 2648f4e

Browse files
committed
2 parents c7880d4 + 4cea3da commit 2648f4e

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/docs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy VitePress site to Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- "docs/**"
8+
- "package.json" # for versioning
9+
10+
# leave empty, we just want the button
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
21+
concurrency:
22+
group: pages
23+
cancel-in-progress: false
24+
25+
jobs:
26+
build:
27+
name: Build Docs
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Setup Bun
36+
uses: oven-sh/setup-bun@v1
37+
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v3
40+
- name: Install dependencies
41+
run: bun i
42+
- name: Build with VitePress
43+
run: |
44+
bun run docs:build
45+
touch docs/.vitepress/dist/.nojekyll
46+
- name: Upload artifact
47+
uses: actions/upload-pages-artifact@v2
48+
with:
49+
path: docs/.vitepress/dist
50+
51+
deploy:
52+
name: Deploy Docs
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@v2

0 commit comments

Comments
 (0)