Skip to content

Commit 00c6219

Browse files
JZ LohJZ Loh
authored andcommitted
modify github action
1 parent 34079de commit 00c6219

10 files changed

Lines changed: 14874 additions & 231 deletions

File tree

.github/workflows/lint.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,40 @@
1-
name: Lint
1+
name: Deploy to GitHub Pages
22

33
on:
4-
pull_request:
54
push:
6-
branches: [main]
5+
branches:
6+
- main
7+
# 允许手动在 GitHub Actions 界面触发部署
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
715
concurrency:
816
group: ${{ github.workflow }}-${{ github.ref }}
917
cancel-in-progress: true
1018

1119
jobs:
1220
build:
13-
name: Lint
21+
name: Build
1422
runs-on: ubuntu-latest
1523

1624
strategy:
1725
matrix:
1826
node-version: [20.x]
1927
steps:
20-
- name: Checkout code
21-
uses: actions/checkout@v4
28+
- name: Checkout
29+
uses: actions/checkout@v5
2230
with:
2331
fetch-depth: 0
2432
lfs: true
2533

26-
- name: Checkout LFS objects
27-
run: git lfs checkout
28-
29-
- uses: pnpm/action-setup@v4.0.0
34+
- name: Setup pnpm
35+
uses: pnpm/action-setup@v4
36+
with:
37+
version: 10
3038

3139
- name: Use Node.js ${{ matrix.node-version }}
3240
uses: actions/setup-node@v4
@@ -35,7 +43,26 @@ jobs:
3543
cache: 'pnpm'
3644

3745
- name: Install dependencies
38-
run: pnpm install
46+
run: pnpm install --frozen-lockfile
47+
48+
# === 关键修复 1:运行构建命令 ===
49+
- name: Build website
50+
run: pnpm build
3951

40-
- name: Run Lint
41-
run: pnpm lint
52+
# === 关键修复 2:上传构建产物 ===
53+
- name: Upload Build Artifact
54+
uses: actions/upload-pages-artifact@v3
55+
with:
56+
path: build # Docusaurus 默认输出目录
57+
58+
deploy:
59+
name: Deploy to GitHub Pages
60+
environment:
61+
name: github-pages
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
needs: build
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4

docs/Linux/SDK编译环境搭建.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
# 编译环境搭建
22

3-
<font color = red> 特别说明: 不能放在虚拟机的共享文件夹中编译!!! </font>
4-
5-
63

74
---
85

docs/tutorial-basics/markdown-features.mdx

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

docusaurus.config.ts

Lines changed: 11 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,35 @@ import type * as Preset from '@docusaurus/preset-classic';
55
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
66

77
const config: Config = {
8-
title: 'My Site',
9-
tagline: 'Dinosaurs are cool',
8+
title: 'JZ notebook',
9+
tagline: 'Embeded notebook',
1010
favicon: 'img/favicon.ico',
1111

1212
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
1313
future: {
1414
v4: true, // Improve compatibility with the upcoming Docusaurus v4
15+
experimental_faster: true,
1516
},
1617

1718
// Set the production url of your site here
18-
url: 'https://your-docusaurus-site.example.com',
19+
url: 'https://bitshelf.github.io',
1920
// Set the /<baseUrl>/ pathname under which your site is served
2021
// For GitHub pages deployment, it is often '/<projectName>/'
21-
baseUrl: '/',
22+
baseUrl: '/docs/',
2223

2324
// GitHub pages deployment config.
2425
// If you aren't using GitHub pages, you don't need these.
25-
organizationName: 'facebook', // Usually your GitHub org/user name.
26-
projectName: 'docusaurus', // Usually your repo name.
26+
organizationName: 'bitshelf', // Usually your GitHub org/user name.
27+
projectName: 'docs', // Usually your repo name.
2728

2829
onBrokenLinks: 'throw',
2930

3031
// Even if you don't use internationalization, you can use this field to set
3132
// useful metadata like html lang. For example, if your site is Chinese, you
3233
// may want to replace "en" with "zh-Hans".
3334
i18n: {
34-
defaultLocale: 'en',
35-
locales: ['en'],
35+
defaultLocale: 'zh-CN',
36+
locales: ['zh-CN'],
3637
},
3738

3839
presets: [
@@ -75,9 +76,9 @@ const config: Config = {
7576
respectPrefersColorScheme: true,
7677
},
7778
navbar: {
78-
title: 'My Site',
79+
title: 'JZ Loh',
7980
logo: {
80-
alt: 'My Site Logo',
81+
alt: 'Logo',
8182
src: 'img/logo.svg',
8283
},
8384
items: [
@@ -88,57 +89,7 @@ const config: Config = {
8889
label: 'Tutorial',
8990
},
9091
{to: '/blog', label: 'Blog', position: 'left'},
91-
{
92-
href: 'https://github.com/facebook/docusaurus',
93-
label: 'GitHub',
94-
position: 'right',
95-
},
96-
],
97-
},
98-
footer: {
99-
style: 'dark',
100-
links: [
101-
{
102-
title: 'Docs',
103-
items: [
104-
{
105-
label: 'Tutorial',
106-
to: '/docs/intro',
107-
},
108-
],
109-
},
110-
{
111-
title: 'Community',
112-
items: [
113-
{
114-
label: 'Stack Overflow',
115-
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
116-
},
117-
{
118-
label: 'Discord',
119-
href: 'https://discordapp.com/invite/docusaurus',
120-
},
121-
{
122-
label: 'X',
123-
href: 'https://x.com/docusaurus',
124-
},
125-
],
126-
},
127-
{
128-
title: 'More',
129-
items: [
130-
{
131-
label: 'Blog',
132-
to: '/blog',
133-
},
134-
{
135-
label: 'GitHub',
136-
href: 'https://github.com/facebook/docusaurus',
137-
},
138-
],
139-
},
14092
],
141-
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
14293
},
14394
prism: {
14495
theme: prismThemes.github,

0 commit comments

Comments
 (0)