Skip to content

Commit a45dabe

Browse files
committed
websites/site/contributing/documentation.md: Added more information about the automated build scripts and that the manual steps are only necessary when the automation fails.
1 parent af906be commit a45dabe

1 file changed

Lines changed: 28 additions & 13 deletions

File tree

websites/site/contributing/documentation.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,24 @@ This ensures the website is always synched with the `master` branch and PRs that
4141

4242
### Build script
4343

44+
#### Local Build and Host
45+
4446
To build the website and run it on your machine, run the PowerShell script: `./websites/site/site.ps1` with the `-ServeDocs` flag. For example:
4547

46-
```
48+
```console
4749
./websites/site/site.ps1 -ServeDocs
4850
```
4951

5052
When executed this will build the site and host it at [http://localhost:8081](http://localhost:8081).
5153

54+
#### Release Build
55+
56+
> [!IMPORTANT]
57+
> The following steps are automated in the `Lucene-Net-Website.yml` workflow. This workflow runs automatically when a PR or branch that contains website changes is merged/pushed to the `master` branch. The workflow submits a new PR with the compiled website content to the `lucenenet-site` repository. The below information is provided in case the automation fails and the release needs to be done manually.
58+
5259
To build the website for release, run the script:
5360

54-
```
61+
```console
5562
./websites/site/site.ps1
5663
```
5764

@@ -137,17 +144,25 @@ publish docs site
137144

138145
### Build script
139146

147+
#### Local Build and Host
148+
140149
To build the api docs and run it on your machine, run the PowerShell script: `./websites/apidocs/docs.ps1`. For example:
141150

142-
```
151+
```console
143152
./websites/apidocs/docs.ps1 -ServeDocs -LuceneNetVersion 4.8.0-beta00008 -BaseUrl http://localhost:8080
144153
```
145154

146155
When executed this will build the site and host it at [http://localhost:8080](http://localhost:8080). _(Ensure to pass in the current version of Lucene.Net you are building.)_
147156

157+
#### Release Build
158+
159+
> [!IMPORTANT]
160+
> The following steps are automated in the `Lucene-Net-Documentation.yml` workflow. This workflow runs automatically when changes are pushed to the corresponding `docs/[Version]` branch. The workflow submits a new PR with the compiled API documentation content to the `lucenenet-site` repository. The below information is provided in case the automation fails and the release needs to be done manually.
161+
162+
148163
To build the api docs for release, run the script:
149164

150-
```
165+
```console
151166
./websites/apidocs/docs.ps1 -LuceneNetVersion 4.8.0-beta00008
152167
```
153168

@@ -156,13 +171,13 @@ This will build the site with all live parameters configured correctly and outpu
156171
The script parameters are:
157172

158173
- `-LuceneNetVersion` _(mandatory)_ This is the Lucene.Net version including pre-release information that is being built. For example: `4.8.0-beta00008`. _(This value will correspond to the folder and branch name where the docs get hosted, see below)_
159-
* `-ServeDocs` _(optional)_ A boolean switch. If present, it will build the docs and host the site. If not present it will build the static site to be hosted elsewhere.
160-
* `-Clean` _(optional)_ A boolean switch. If present, it will clear all caches and tool files before it builds again. This is handy if a new version of docfx is available or if there's odd things occurring with the incremental build.
161-
* `-DisableMetaData` _(optional)_ A boolean switch. If present it will disable the docfx metadata build operation of the docs build. Can be handy when debugging the docs build.
162-
* `-DisableBuild` _(optional)_ A boolean switch. If present it will disable the site building operation of the docs build. Can be handy when debugging the docs build.
163-
* `-DisablePlugins` _(optional)_ A boolean switch. If present it will not build the custom Lucene.Net `DocumentationTools.sln` docsfx plugins and exclude them from the build.
164-
* `-LogLevel` _(optional)_ Default is Warning. Options are: Diagnostic, Verbose, Info, Warning, Error.
165-
* `-BaseUrl` _(optional)_ Default is https://lucenenet.apache.org/docs/. Used to set the base URL of the docfx xref map files for cross linking between project builds.
174+
- `-ServeDocs` _(optional)_ A boolean switch. If present, it will build the docs and host the site. If not present it will build the static site to be hosted elsewhere.
175+
- `-Clean` _(optional)_ A boolean switch. If present, it will clear all caches and tool files before it builds again. This is handy if a new version of docfx is available or if there's odd things occurring with the incremental build.
176+
- `-DisableMetaData` _(optional)_ A boolean switch. If present it will disable the docfx metadata build operation of the docs build. Can be handy when debugging the docs build.
177+
- `-DisableBuild` _(optional)_ A boolean switch. If present it will disable the site building operation of the docs build. Can be handy when debugging the docs build.
178+
- `-DisablePlugins` _(optional)_ A boolean switch. If present it will not build the custom Lucene.Net `DocumentationTools.sln` docsfx plugins and exclude them from the build.
179+
- `-LogLevel` _(optional)_ Default is Warning. Options are: Diagnostic, Verbose, Info, Warning, Error.
180+
- `-BaseUrl` _(optional)_ Default is https://lucenenet.apache.org/docs/. Used to set the base URL of the docfx xref map files for cross linking between project builds.
166181

167182
### File/folder structure
168183

@@ -194,12 +209,12 @@ To use the dotnet tool you must download the current tag of the Java Lucene proj
194209

195210
Then install the tool:
196211

197-
```
212+
```console
198213
dotnet tool install javadoc2markdown --add-source https://pkgs.dev.azure.com/lucene-net/_packaging/lucene-net-tools/nuget/v3/index.json --tool-path ./
199214
```
200215

201216
Then run the command:
202-
```
217+
```console
203218
javadoc2markdown <LUCENE DIRECTORY> <LUCENENET DIRECTORY>
204219
```
205220

0 commit comments

Comments
 (0)