Skip to content

Commit e9d3fe1

Browse files
committed
Setup aiscript docs site
1 parent ea75716 commit e9d3fe1

22 files changed

+8341
-0
lines changed

.github/workflows/deploy-docs.yaml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy AIScript docs site to Pages
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: Change directory
38+
run: cd aiscript-docs
39+
- name: Install dependencies
40+
run: pnpm install
41+
- name: Build with Rspress
42+
run: |
43+
pnpm run build
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: doc_build
48+
49+
# Deployment job
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
needs: build
55+
runs-on: ubuntu-latest
56+
name: Deploy
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

aiscript-docs/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Local
2+
.DS_Store
3+
*.local
4+
*.log*
5+
6+
# Dist
7+
node_modules
8+
dist/
9+
doc_build/
10+
11+
# IDE
12+
.vscode/*
13+
!.vscode/extensions.json
14+
.idea

aiscript-docs/.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Lock files
2+
package-lock.json
3+
pnpm-lock.yaml
4+
yarn.lock

aiscript-docs/.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"singleQuote": true
3+
}

aiscript-docs/README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Rspress website
2+
3+
## Setup
4+
5+
Install the dependencies:
6+
7+
```bash
8+
npm install
9+
```
10+
11+
## Get started
12+
13+
Start the dev server:
14+
15+
```bash
16+
npm run dev
17+
```
18+
19+
Build the website for production:
20+
21+
```bash
22+
npm run build
23+
```
24+
25+
Preview the production build locally:
26+
27+
```bash
28+
npm run preview
29+
```

aiscript-docs/biome.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.0/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"vcs": {
7+
"enabled": true,
8+
"clientKind": "git",
9+
"useIgnoreFile": true
10+
},
11+
"formatter": {
12+
"indentStyle": "space"
13+
},
14+
"javascript": {
15+
"formatter": {
16+
"quoteStyle": "single"
17+
}
18+
},
19+
"css": {
20+
"parser": {
21+
"cssModules": true
22+
}
23+
},
24+
"linter": {
25+
"enabled": true,
26+
"rules": {
27+
"recommended": true
28+
}
29+
}
30+
}

aiscript-docs/docs/_meta.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"text": "Guide",
4+
"link": "/guide/",
5+
"activeMatch": "/guide/"
6+
},
7+
{
8+
"text": "Get Started",
9+
"link": "/get-started/",
10+
"activeMatch": "/get-started/"
11+
},
12+
{
13+
"text": "Std library",
14+
"link": "/std-library/",
15+
"activeMatch": "/std-library/"
16+
}
17+
]
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Get started
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
["index"]

aiscript-docs/docs/guide/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# AIScript

0 commit comments

Comments
 (0)