Skip to content

Commit 57b472b

Browse files
committed
update ci/cd
1 parent 757e67b commit 57b472b

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: CI
22

33
on:
4+
push:
5+
branches: [ main ]
46
pull_request:
57
branches: [ main ]
68

.github/workflows/deploy-docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Deploy docs-site to GitHub Pages.
2+
# One-time setup: Repo → Settings → Pages → Build and deployment → Source: "GitHub Actions".
3+
name: Deploy docs
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: pages
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Use Node.js 20
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20
29+
30+
- name: Install dependencies
31+
run: yarn install
32+
33+
- name: Build docs-site
34+
env:
35+
VITEPRESS_BASE: /${{ github.event.repository.name }}/
36+
run: yarn docs:build
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: docs-site/.vitepress/dist
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deploy.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deploy
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)