Skip to content

Commit 2994be7

Browse files
committed
feat: add ci and fix link
1 parent 49ea2fb commit 2994be7

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/docs.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
2+
name: Deploy Github Actions
3+
on:
4+
push:
5+
branches: [main, feature-docs]
6+
7+
jobs:
8+
Deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Use Node.js
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: "20"
16+
cache: pnpm
17+
cache-dependency-path: docs/pnpm-lock.yaml
18+
- name: Install dependencies
19+
run: pnpm install --frozen-lockfile
20+
- name: Deploy
21+
run: |
22+
cd docs
23+
pnpm build
24+
cd src/.vuepress/dist
25+
26+
# echo 'www.example.com' > CNAME
27+
28+
git init
29+
git config user.email "[email protected]"
30+
git config user.name "spacemeowx2"
31+
git checkout -b dist
32+
git add -A
33+
git commit -m "deploy at `date`"
34+
35+
git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} dist

docs/src/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function HomepageHeader() {
1717
<div className={styles.buttons}>
1818
<Link
1919
className="button button--secondary button--lg"
20-
to="/docs/intro">
21-
快速开始
20+
to="/docs/tutorial/usage">
21+
快速上手
2222
</Link>
2323
</div>
2424
</div>

0 commit comments

Comments
 (0)