Skip to content

Commit 781dc08

Browse files
committed
feat: add deploy workflows
1 parent cd7c155 commit 781dc08

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Sample workflow for building and deploying a VitePress site to GitHub Pages
2+
name: Deploy VitePress site to Pages
3+
4+
on:
5+
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
6+
# using the `master` branch as the default branch.
7+
push:
8+
branches: [main]
9+
10+
# Allows you to run this workflow manually from the Actions tab
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 job
27+
build:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v5
32+
with:
33+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
34+
# - uses: pnpm/action-setup@v4 # Uncomment this block if you're using pnpm
35+
# with:
36+
# version: 9 # Not needed if you've set "packageManager" in package.json
37+
- uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
38+
- name: Setup Node
39+
uses: actions/setup-node@v6
40+
with:
41+
node-version: 24
42+
cache: npm # or pnpm / yarn
43+
- name: Setup Pages
44+
uses: actions/configure-pages@v4
45+
- name: Install dependencies
46+
run: bun install # or pnpm install / yarn install / bun install
47+
- name: Build with VitePress
48+
run: bun run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: docs/.vitepress/dist
53+
54+
# Deployment job
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
needs: build
60+
runs-on: ubuntu-latest
61+
name: Deploy
62+
steps:
63+
- name: Deploy to GitHub Pages
64+
id: deployment
65+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)