Skip to content

Commit ed6e158

Browse files
authored
docs(readme): Add README.md for Javadoc deployment action
- Introduced a README.md file to document the GitHub Action for deploying Javadoc to GitHub Pages. - Included instructions on how to set up and use the action, with example workflows. - Detailed the configurable inputs such as `GITHUB_TOKEN`, `BRANCH`, `JAVA_VERSION`, and others. - Highlighted features like automatic Javadoc generation, customizable branch, JDK configuration, test skipping, and branch cleanup. - Added a section on licensing under the Apache License 2.0.
1 parent 93963b3 commit ed6e158

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

README.md

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,35 @@
1-
# Deploy Javadoc to GitHub Pages
1+
# 📘 Deploy Javadoc to GitHub Pages
22

3-
This GitHub Action automates the deployment of Javadoc documentation to GitHub Pages. It builds your Java project, generates Javadoc, and publishes it to a GitHub Pages branch.
3+
This GitHub Action automates the deployment of Javadoc documentation to GitHub Pages. It builds your Java project, generates Javadoc, and publishes it to a specified branch, typically `gh-pages`.
44

5-
## Features
5+
## Features
66

7-
- **Automatic Javadoc Generation**: Builds the project and generates Javadoc documentation.
8-
- **Customizable Branch**: Publish Javadoc to a specified GitHub Pages branch.
9-
- **JDK Configuration**: Supports multiple JDK versions and distributions.
10-
- **Test Skipping**: Option to skip tests during the build process.
11-
- **Branch Cleanup**: Option to clean up old branches before publishing.
7+
- **Automatic Javadoc Generation**: Automatically builds the project and generates Javadoc documentation.
8+
- **Customizable Branch**: Allows publishing of Javadoc to a specified branch (default is `gh-pages`).
9+
- **Flexible JDK Configuration**: Supports multiple JDK versions and distributions, allowing for easy customization.
10+
- **Optional Test Skipping**: Configurable option to skip tests during the build process.
11+
- **Branch Cleanup**: Ability to clean up old branches before publishing, ensuring a fresh deployment environment.
1212

13-
## Inputs
13+
## ⚙️ Inputs
14+
15+
The following inputs can be configured for this action:
1416

1517
### `GITHUB_TOKEN`
1618
- **Description**: GitHub token used for repository access and authentication.
1719
- **Required**: Yes
1820

1921
### `BRANCH`
20-
- **Description**: The name of the branch where the Javadoc documentation will be published. Defaults to `'gh-pages'`.
22+
- **Description**: The branch where the Javadoc documentation will be published. Defaults to `'gh-pages'`.
2123
- **Required**: No
2224
- **Default**: `'gh-pages'`
2325

2426
### `BRANCH_CLEANUP`
25-
- **Description**: Whether to clean up old branches. Set to `'true'` to delete the old branch before publishing. Defaults to `'false'`.
27+
- **Description**: Whether to clean up old branches before publishing. Set to `'true'` to delete the old branch. Defaults to `'false'`.
2628
- **Required**: No
2729
- **Default**: `'false'`
2830

2931
### `JAVA_VERSION`
30-
- **Description**: The version of Java your project is using (e.g., 17).
32+
- **Description**: The version of Java your project is using (e.g., `17`).
3133
- **Required**: Yes
3234
- **Default**: `'17'`
3335

@@ -37,22 +39,22 @@ This GitHub Action automates the deployment of Javadoc documentation to GitHub P
3739
- **Default**: `'adopt'`
3840

3941
### `SKIP_TESTS`
40-
- **Description**: Whether to skip tests during the build process. Set to `'true'` to skip tests, `'false'` otherwise.
42+
- **Description**: Whether to skip tests during the build process. Set to `'true'` to skip tests.
4143
- **Required**: No
4244
- **Default**: `'false'`
4345

4446
### `DOC_DIRECTORY`
45-
- **Description**: The directory where the Javadoc documentation is generated. Defaults to `'target/reports/apidocs'`.
47+
- **Description**: The directory where the Javadoc documentation is generated. Defaults to `'target/site/apidocs'`.
4648
- **Required**: No
47-
- **Default**: `'target/reports/apidocs'`
49+
- **Default**: `'target/site/apidocs'`
4850

49-
## Usage
51+
## 🚀 Usage
5052

5153
To use this GitHub Action, create a workflow YAML file in your repository's `.github/workflows` directory.
5254

5355
### Example Workflow
5456

55-
Here’s an example workflow that builds the project, generates Javadoc, and publishes it to the `gh-pages` branch:
57+
Below is an example workflow that builds the project, generates Javadoc, and publishes it to the `gh-pages` branch:
5658

5759
```yaml
5860
name: Deploy Javadoc to GitHub Pages
@@ -77,14 +79,15 @@ jobs:
7779
JAVA_VERSION: '17'
7880
JAVA_DISTRIBUTION: 'adopt'
7981
SKIP_TESTS: 'false'
80-
DOC_DIRECTORY: 'target/reports/apidocs'
82+
DOC_DIRECTORY: 'target/site/apidocs'
8183
BRANCH: 'gh-pages'
8284
BRANCH_CLEANUP: 'false'
8385
```
8486
87+
8588
### Example with Branch Cleanup
8689
87-
If you want to clean up old branches before publishing, set the CLEANUP_BRANCH input to 'true':
90+
To clean up old branches before publishing, set the `BRANCH_CLEANUP` input to 'true':
8891

8992
```yaml
9093
name: Deploy Javadoc to GitHub Pages
@@ -112,4 +115,7 @@ jobs:
112115
DOC_DIRECTORY: 'target/reports/apidocs'
113116
BRANCH: 'gh-pages'
114117
BRANCH_CLEANUP: 'true'
115-
```
118+
```
119+
120+
## 📄 License
121+
This project is licensed under the Apache License 2.0 - see the [LICENSE file](https://github.com/DashioDevs/action-javadocs-deploy/blob/main/LICENSE) for details.

0 commit comments

Comments
 (0)