Skip to content

Commit 0e3d2ad

Browse files
authored
docs: improve and use docusaurus (#898)
This PR fixes a lot of issues with missing and wrong documentation. Also, it moves to docusaurus for building the static website. Missing parts: telemetry / azure stuff, and a nice welcome page.
1 parent 920bac1 commit 0e3d2ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+22157
-2765
lines changed

.github/workflows/docs-test.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Test Documentation Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- ".github/workflows/docs-test.yml"
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
test-build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "22"
23+
cache: "npm"
24+
cache-dependency-path: docs/package-lock.json
25+
26+
- name: Install Dependencies
27+
working-directory: docs
28+
run: npm ci
29+
30+
- name: Build Docusaurus
31+
working-directory: docs
32+
run: npm run build

.github/workflows/gh-pages.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- "docs/**"
9+
- ".github/workflows/gh-pages.yml"
710

811
workflow_dispatch:
912

@@ -25,18 +28,29 @@ jobs:
2528
steps:
2629
- uses: actions/checkout@v4
2730

28-
- name: Setup .NET
29-
uses: actions/setup-dotnet@v3
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
3033
with:
31-
dotnet-version: 9.x
34+
node-version: "22"
35+
cache: "npm"
36+
cache-dependency-path: docs/package-lock.json
3237

33-
- run: dotnet tool restore
38+
- name: Install Dependencies
39+
working-directory: docs
40+
run: npm ci
3441

35-
- run: dotnet docfx
42+
- name: Build Docusaurus
43+
working-directory: docs
44+
run: npm run build
3645

37-
- uses: actions/upload-pages-artifact@v3
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v5
48+
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
3851
with:
39-
path: _site
52+
path: docs/build
4053

41-
- uses: actions/deploy-pages@v4
54+
- name: Deploy to GitHub Pages
4255
id: deployment
56+
uses: actions/deploy-pages@v4

CONTRIBUTING.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ First of all, thank you for considering contributing to KubeOps.
44
This is an open souce project and shall be driven by the community.
55

66
This project and everyone participating in it is governed by the
7-
[KubeOps Code of Conduct](./CODE_OF_CONDUCT.md). By participating, you are
7+
[KubeOps Code of Conduct](https://github.com/buehler/dotnet-operator-sdk/blob/main/CODE_OF_CONDUCT.md). By participating, you are
88
expected to uphold this code. Please report unacceptable behavior by
99
[opening a new issue](https://github.com/buehler/dotnet-operator-sdk/issues/new) with the title prefixed with '[CODE OF CONDUCT]'.
1010

@@ -15,6 +15,7 @@ to develop on KubeOps.
1515

1616
Feel free to open an issue in the [issues section](https://github.com/buehler/dotnet-operator-sdk/issues).
1717
There are three issue templates:
18+
1819
- Bug: to report an issue/bug that prevents usage or is an inconvenience of KubeOps
1920
- Feature request: to report a new feature that would enhance KubeOps
2021
- Documentation: to report missing / wrong documentation
@@ -25,21 +26,23 @@ Please search through the already created issues to find similarities.
2526

2627
To directly contribute to the solution, create a fork of the repository
2728
and implement your addition. Please keep in mind that reviewing takes some
28-
time and is not done instantly.
29+
time and is not done instantly. The people working on the project are volunteers
30+
and will do their best to review your PR as soon as possible.
2931

3032
Please adhere to the linting rules and the general code style in the repository.
3133
Also, add tests for your changes to ensure that the system works well
3234
when other changes happen.
3335

34-
The PR can have any name, but it would be nice if you adhere to
36+
The PR name should adhere to
3537
the repositories standard naming. Please name your PR
36-
with [Convential Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary).
38+
with [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary).
3739

3840
**NOTE for breaking changes**: please state breaking changes
3941
in the PR description. The review process will be faster when
4042
breaking changes are well documented.
4143

4244
A few examples:
45+
4346
- "fix: Null exception during watcher process"
4447
- "feat(core): Add new functionality"
4548
- "feat(testing): expose kubernetes client for testing"
@@ -50,7 +53,7 @@ The PR will be squashed and merged into the default branch.
5053

5154
## Local Development
5255

53-
To setup a local development environment, you'll need to perform the follwing steps:
56+
To set up a local development environment, you'll need to perform the following steps:
5457

5558
- Check out the repository (or your fork)
5659
- If you want to run the Operator locally, you'll need some Kubernetes instance.
@@ -59,10 +62,11 @@ To setup a local development environment, you'll need to perform the follwing st
5962
- minikube / any other local Kubernetes
6063
- Deployed Kubernetes (e.g. GCP Kubernetes instance)
6164
- You can now code your stuff.
62-
- `tests/KubeOps.TestOperator` is a developed small operator that can be run
63-
locally to test your implementations.
64-
- Write tests for your changes
65+
- Use the implementation in the examples folder to test your changes. Those examples
66+
may also be extended or new ones added for testing purposes.
67+
- Write tests for your changes!
6568
- Build the whole solution and check for linting errors / warnings.
6669
**NOTE** that any warning will result in an error when building
6770
with `Release` configuration.
6871
- Do not change the linting rules without creating a discussion/issue first.
72+
- Create a PR with an appropriate name and description.

0 commit comments

Comments
 (0)