Skip to content

Commit dc3ad89

Browse files
authored
[refactor] Simplify site build script and make it work locally (apache#94)
* [refactor] Simplify site build script and make it work locally This patch simplify our site build script, the previous need to clone two repositories and now only our main repo. Also this patch make our the build could be work locally, which make developer test or run website more easier. also close: apache/seatunnel#1550 * Change readme files * recover docs dir * test * delete file the whole dirs * recover the directory docs
1 parent 4282f2b commit dc3ad89

File tree

6 files changed

+137
-236
lines changed

6 files changed

+137
-236
lines changed

.github/workflows/deploy.yml

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
node-version: 14
2626
- name: Documents Sync
2727
run: |
28-
chmod -R 775 ./tools/build-docs.sh
2928
bash ./tools/build-docs.sh
3029
shell: bash
3130
- name: install

.gitignore

+15-5
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,33 @@
1+
# System Temp
2+
.DS_Store
3+
14
# Intellij
25
.idea/
36
*.iml
47
*.iws
58

9+
# vscode
10+
.vscode
11+
612
# Dependencies
7-
/node_modules
13+
node_modules/
14+
package-lock.json
815

916
# Production
10-
/build
17+
build/
1118

1219
# Generated files
1320
.docusaurus
1421
.cache-loader
1522

16-
.DS_Store
23+
# Temp directory for perpare docs for main repository
24+
# those directories will be create when you run script `./tool/build_docs.sh`
25+
swap/
26+
docs/
27+
static/image_en/
28+
1729
dist
1830
dist-ssr
1931
*.local
2032
*.idea
2133
*.iml.
22-
.vscode
23-
/package-lock.json

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ This website is compiled using node, using Docusaurus framework components
2323

2424
1. Download and install nodejs (version>12.5.0)
2525
2. Clone the code to the local `git clone [email protected]:apache/incubator-seatunnel-website.git`
26-
2. Run `npm install` to install the required dependent libraries.
27-
3. Run `npm run start` in the root directory, you can visit http://localhost:3000 to view the English mode preview of the site
28-
4. Run `npm run start-zh` in the root directory, you can visit http://localhost:3000 to view the Chinese mode preview of the site
29-
5. To generate static website resource files, run `npm run build`. The static resources of the build are in the build directory.
26+
3. Run `./tools/build-docs.sh` to fetch and prepare docs form **apache/incubator-seatunnel**
27+
4. Run `npm install` to install the required dependent libraries.
28+
5. Run `npm run start` in the root directory, you can visit http://localhost:3000 to view the English mode preview of the site
29+
6. Run `npm run start-zh` in the root directory, you can visit http://localhost:3000 to view the Chinese mode preview of the site
30+
7. To generate static website resource files, run `npm run build`. The static resources of the build are in the build directory.
3031

3132
## 2. Directory structure
3233

@@ -38,7 +39,6 @@ This website is compiled using node, using Docusaurus framework components
3839
├── babel.config.js
3940
├── blog
4041
├── community // Community
41-
├── docs // Documentation
4242
├── docusaurus.config.js
4343
|-- download // Download
4444
├── faq // Q&A

README_ZH.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ asf-staging 官网测试环境 通过https://seatunnel.staged.apache.org 访问
2323

2424
1. 下载并安装 nodejs(version>12.5.0)
2525
2. 克隆代码到本地 `git clone [email protected]:apache/incubator-seatunnel-website.git`
26-
2. 运行 `npm install` 来安装所需的依赖库。
27-
3. 在根目录运行`npm run start`,可以访问http://localhost:3000查看站点英文模式预览
28-
4. 在根目录运行`npm run start-zh`,可以访问http://localhost:3000查看站点的中文模式预览
29-
5. 要生成静态网站资源文件,运行 `npm run build`。构建的静态资源在build目录中。
26+
3. 运行 `./tools/build-docs.sh`**apache/incubator-seatunnel** 中拉取、准备文档
27+
4. 运行 `npm install` 来安装所需的依赖库。
28+
5. 在根目录运行`npm run start`,可以访问http://localhost:3000查看站点英文模式预览
29+
6. 在根目录运行`npm run start-zh`,可以访问http://localhost:3000查看站点的中文模式预览
30+
7. 要生成静态网站资源文件,运行 `npm run build`。构建的静态资源在build目录中。
3031

3132
## 2.目录结构
3233

@@ -38,7 +39,6 @@ asf-staging 官网测试环境 通过https://seatunnel.staged.apache.org 访问
3839
├── babel.config.js
3940
├── blog
4041
├── community // 社区
41-
├── docs // 文档
4242
├── docusaurus.config.js
4343
|-- download // 下载
4444
├── faq // Q&A

docs/introduction.md

-169
This file was deleted.

0 commit comments

Comments
 (0)