Skip to content

Commit 239836f

Browse files
committed
chore: update readme
Signed-off-by: Ashing Zheng <axingfly@gmail.com>
1 parent 277c425 commit 239836f

File tree

2 files changed

+39
-15
lines changed

2 files changed

+39
-15
lines changed

.github/workflows/deploy-cloudflare.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ on:
44
push:
55
branches:
66
- main
7-
- master
87
pull_request:
98
branches:
109
- main
11-
- master
1210

1311
jobs:
1412
deploy:

README.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,44 @@
1-
# Running mdBook
1+
# Kubebuilder Documentation
22

3-
The kubebuilder book is served using [mdBook](https://github.com/rust-lang-nursery/mdBook). If you want to test changes to the book locally, follow these directions:
3+
This is the Chinese translation of the Kubebuilder project documentation, based on the [official documentation](https://github.com/kubernetes-sigs/kubebuilder).
44

5-
1. Follow the instructions at [https://rust-lang.github.io/mdBook/guide/installation.html](https://rust-lang.github.io/mdBook/guide/installation.html) to
6-
install mdBook.
7-
2. Make sure [controller-gen](https://pkg.go.dev/sigs.k8s.io/controller-tools/cmd/controller-gen) is installed in `$GOPATH`.
8-
3. cd into the `docs/book` directory
9-
4. Run `mdbook serve`
10-
5. Visit [http://localhost:3000](http://localhost:3000)
5+
## Translation Base
116

12-
# Steps to deploy
7+
This translation is based on the following commit:
8+
- **Source commit**: `3fd04199acb4556376dc17a7393bfd43bcd40c26`
139

14-
There are no manual steps needed to deploy the website.
10+
## Local Development
1511

16-
Kubebuilder book website is deployed on Netlify.
17-
There is a preview of the website for each PR.
18-
As soon as the PR is merged, the website will be built and deployed on Netlify.
12+
### Quick Start
13+
14+
```bash
15+
# Build and start local server
16+
./book/install-and-build.sh build
17+
cd book && mdbook serve
18+
19+
# Visit http://localhost:3000
20+
```
21+
22+
### Manual Installation (Optional)
23+
24+
If you need to install dependencies manually:
25+
26+
1. Install [mdBook](https://rust-lang.github.io/mdBook/guide/installation.html)
27+
2. Make sure [controller-gen](https://pkg.go.dev/sigs.k8s.io/controller-tools/cmd/controller-gen) is installed
28+
3. Run `mdbook serve`
29+
30+
## Deployment
31+
32+
### Automatic Deployment
33+
34+
Pushing to `main` branch will automatically trigger GitHub Actions deployment to Cloudflare Pages.
35+
36+
### Manual Deployment
37+
38+
```bash
39+
# Required environment variables:
40+
# CLOUDFLARE_API_TOKEN
41+
# CLOUDFLARE_ACCOUNT_ID
42+
43+
./deploy-cloudflare.sh
44+
```

0 commit comments

Comments
 (0)