Skip to content

Commit 5962c79

Browse files
authored
chore: update workflow
1 parent bbf746d commit 5962c79

File tree

2 files changed

+48
-52
lines changed

2 files changed

+48
-52
lines changed

.github/workflows/deploy.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: npm
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build with VitePress
26+
run: npm run docs:build
27+
28+
- name: Generate CNAME
29+
run: echo "book.doocs.org" > docs/.vitepress/dist/CNAME
30+
31+
- name: Upload artifact
32+
uses: actions/upload-pages-artifact@v3
33+
with:
34+
path: docs/.vitepress/dist
35+
36+
deploy:
37+
needs: build
38+
runs-on: ubuntu-latest
39+
permissions:
40+
pages: write
41+
id-token: write
42+
environment:
43+
name: github_pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

.github/workflows/sync.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

0 commit comments

Comments
 (0)