Skip to content

Commit 5de3229

Browse files
committed
gh-pages
1 parent 0252e4b commit 5de3229

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

.github/workflows/gh-pages.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy docs
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
workflow_dispatch:
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 job
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0 # Not needed if lastUpdated is not enabled
27+
- uses: pnpm/action-setup@v3 # pnpm is optional but recommended, you can also use npm / yarn
28+
with:
29+
version: 8
30+
- name: Setup Node
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version: 20
34+
cache: pnpm
35+
- name: Setup Pages
36+
uses: actions/configure-pages@v5
37+
- name: Install dependencies
38+
run: pnpm install
39+
- name: Build with Rspress
40+
run: |
41+
pnpm run build
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
44+
with:
45+
path: apps/site/doc_build
46+
47+
# Deployment job
48+
deploy:
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
needs: build
53+
runs-on: ubuntu-latest
54+
name: Deploy
55+
steps:
56+
- name: Deploy to GitHub Pages
57+
id: deployment
58+
uses: actions/deploy-pages@v4

apps/site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "site",
2+
"name": "@kona/site",
33
"version": "1.0.0",
44
"private": true,
55
"scripts": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "",
66
"main": "index.js",
77
"scripts": {
8-
"test": "echo \"Error: no test specified\" && exit 1"
8+
"build:site": "pnpm --filter @kona/site build"
99
},
1010
"keywords": [],
1111
"author": "",

0 commit comments

Comments
 (0)