-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.34 KB
/
docs.yml
File metadata and controls
48 lines (40 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy Docs
on:
push:
branches: [master]
paths:
- 'docs/**'
- '.github/workflows/docs.yml'
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: |
bun install --frozen-lockfile
cd docs && bun install --frozen-lockfile
- name: Build docs
env:
VITEPRESS_BASE: /
run: cd docs && bun run build
- name: Deploy to gh-pages
run: |
cd docs/.vitepress/dist
echo "noorm.dev" > CNAME
git init
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add -A
git commit -m "Deploy docs from ${{ github.sha }}"
git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git HEAD:gh-pages