Skip to content

Commit a34285f

Browse files
authored
build: website for apache dns (#600)
Signed-off-by: tison <[email protected]>
1 parent ba9af9d commit a34285f

File tree

6 files changed

+13137
-43
lines changed

6 files changed

+13137
-43
lines changed

.asf.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# All configurations could be found here: https://github.com/apache/infrastructure-asfyaml/
19+
20+
github:
21+
description: "Fast. Easy. Done. Processing Excels without worrying about large files causing OOM."
22+
homepage: https://fesod.apache.org
23+
labels:
24+
- java
25+
- excel
26+
- office
27+
enabled_merge_buttons:
28+
squash: true
29+
merge: false
30+
rebase: false
31+
32+
notifications:
33+
34+
35+
pullrequests: [email protected]
36+
discussions: [email protected]
37+
38+
publish:
39+
whoami: gh-pages

.github/workflows/deploy-docs.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,43 @@ name: Deploy Docusaurus to GitHub Pages
22

33
on:
44
push:
5-
branches: [ main ] # 或 master,取决于你的默认分支
5+
branches: [ main ]
66

77
jobs:
88
deploy:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
with:
1313
fetch-depth: 0
14-
- uses: actions/setup-node@v3
14+
15+
- uses: pnpm/action-setup@v4
16+
with:
17+
version: 8
18+
run_install: false
19+
20+
- uses: actions/setup-node@v4
1521
with:
16-
node-version: 18
17-
- run: cd website && npm install
18-
- run: cd website && npm run build
19-
- uses: peaceiris/actions-gh-pages@v3
22+
node-version: "20"
23+
cache: pnpm
24+
cache-dependency-path: "website/pnpm-lock.yaml"
25+
26+
- name: Corepack
27+
working-directory: website
28+
run: npm i -g --force corepack && corepack enable
29+
30+
- name: Install Dependencies
31+
working-directory: website
32+
run: pnpm install --frozen-lockfile
33+
34+
- name: Build
35+
working-directory: website
36+
run: pnpm build
37+
38+
- name: Copy asf file
39+
run: cp .asf.yaml ./website/build/.asf.yaml
40+
41+
- uses: peaceiris/actions-gh-pages@v4
2042
with:
21-
github_token: ${{ secrets.DOC_PAT_TOKEN }}
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
2244
publish_dir: website/build

.gitignore

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
.vscode/
23
*/.settings/
34
*.idea
45
.DS_Store
@@ -20,9 +21,6 @@ dependency-reduced-pom.xml
2021
/.mvn/wrapper/maven-wrapper.jar
2122

2223
# website
23-
.vscode/
24-
website/node_modules
25-
website/build
2624
website/node_modules
2725
website/build
2826
website/.docusaurus
@@ -34,12 +32,8 @@ website/.env.production.local
3432
website/npm-debug.log*
3533
website/yarn-debug.log*
3634
website/yarn-error.log*
37-
website/package-lock.json
38-
website/versioned_docs
39-
website/versioned_sidebars
40-
website/versions.json
41-
website/pnpm-lock.yaml
42-
website/yarn.lock
35+
36+
# fuzzing
4337
**/.cifuzz-corpus/
4438
**/fuzz_corpus/
4539
**/resources/**/fuzz/*Inputs/

website/README.md

Lines changed: 17 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,55 +10,46 @@ This website is built using [Docusaurus](https://docusaurus.io/), a modern stati
1010
## Installation
1111

1212
```bash
13-
yarn install
14-
# yarn install --registry=https://registry.npmmirror.com
13+
pnpm install
1514
```
1615

1716
## Local Development
1817

19-
```bash
20-
# English
21-
yarn start
18+
Preview the English website locally:
2219

23-
# Chinese
24-
yarn start --locale zh-cn
20+
```bash
21+
pnpm start
2522
```
2623

27-
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
28-
29-
## I18N
24+
Preview the Chinese website locally:
3025

3126
```bash
32-
# Chinese
33-
yarn write-translations --locale zh-cn
34-
35-
# English
36-
yarn write-translations --locale en
27+
pnpm start --locale zh-cn
3728
```
3829

39-
## Build
30+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
4031

41-
```bash
42-
yarn build
43-
```
32+
## Internationalization
4433

45-
This command generates static content into the `build` directory and can be served using any static contents hosting service.
34+
To write Chinese translation files, run:
4635

47-
## Deployment
36+
```bash
37+
pnpm write-translations --locale zh-cn
38+
```
4839

49-
Using SSH:
40+
To write English translation files, run:
5041

5142
```bash
52-
USE_SSH=true yarn deploy
43+
pnpm write-translations --locale en
5344
```
5445

55-
Not using SSH:
46+
## Build
5647

5748
```bash
58-
GIT_USER=<Your GitHub username> yarn deploy
49+
pnpm build
5950
```
6051

61-
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
52+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
6253

6354
## Directory Structure
6455

0 commit comments

Comments
 (0)