Skip to content

Commit aefbdfd

Browse files
Copilotneilime
authored andcommitted
feat: implement documentation aggregation system
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent 412f233 commit aefbdfd

File tree

9 files changed

+726
-9
lines changed

9 files changed

+726
-9
lines changed

.env

Whitespace-only changes.

.github/scripts/generate-docs.js

100644100755
File mode changed.

.github/workflows/main-ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,28 @@ jobs:
3737
name: github-pages
3838
url: ${{ steps.deployment.outputs.url }}
3939
steps:
40+
- id: generate-github-actions-docs
41+
uses: hoverkraft-tech/ci-dokumentor@c46a1a108957237cf485103a80b060c35c7dba33 # 0.2.2
42+
with:
43+
source: .github/workflows/sync-docs-push.yml
44+
45+
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
46+
id: generate-token
47+
with:
48+
app-id: ${{ vars.CI_BOT_APP_ID }}
49+
private-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
50+
51+
- uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@b7dd413209df265bef8d7eb0efb117eaabc684c4 # 0.27.0
52+
with:
53+
github-token: ${{ steps.generate-token.outputs.token }}
54+
branch: docs/action-documentation-update
55+
title: "docs: update action documentation"
56+
body: Update action documentation
57+
commit-message: |
58+
docs: update action documentation
59+
60+
[skip ci]
61+
4062
- id: deployment
4163
uses: hoverkraft-tech/ci-github-publish/actions/deploy/github-pages@0.12.1
4264
with:
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<!-- header:start -->
2+
3+
# GitHub Reusable Workflow: Push Documentation Helper
4+
5+
<div align="center">
6+
<img src="https://opengraph.githubassets.com/ee8743035f4d97b88b8e03937037b13ca280a32c2398978b76e268b0fa4cf3b1/hoverkraft-tech/public-docs" width="60px" align="center" alt="Push Documentation Helper" />
7+
</div>
8+
9+
---
10+
11+
<!-- header:end -->
12+
<!-- badges:start -->
13+
14+
[![Release](https://img.shields.io/github/v/release/hoverkraft-tech/public-docs)](https://github.com/hoverkraft-tech/public-docs/releases)
15+
[![License](https://img.shields.io/github/license/hoverkraft-tech/public-docs)](http://choosealicense.com/licenses/mit/)
16+
[![Stars](https://img.shields.io/github/stars/hoverkraft-tech/public-docs?style=social)](https://img.shields.io/github/stars/hoverkraft-tech/public-docs?style=social)
17+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/public-docs/blob/main/CONTRIBUTING.md)
18+
19+
<!-- badges:end -->
20+
<!-- overview:start -->
21+
22+
## Overview
23+
24+
Reusable workflow that bundles project docs and triggers public portal sync
25+
26+
- Collects readme and docs Markdown, adds sync metadata, and uploads a short-lived artifact
27+
- Dispatches a repository event so hoverkraft-tech/public-docs can ingest and publish updates
28+
29+
<!-- overview:end -->
30+
<!-- usage:start -->
31+
32+
## Usage
33+
34+
```yaml
35+
name: Push Documentation Helper
36+
on:
37+
push:
38+
branches:
39+
- main
40+
jobs:
41+
sync-docs-dispatcher:
42+
uses: hoverkraft-tech/public-docs/.github/workflows/sync-docs-dispatcher.yml@4ab9c098ba58ed7f19ae6e879516c04ed5379d1a # copilot/centralize-project-documentation
43+
secrets:
44+
# GitHub token with write access to trigger repository_dispatch in public-docs
45+
# This input is required.
46+
PUBLIC_DOCS_TOKEN: ""
47+
with:
48+
# Path to documentation in source repo (default: docs)
49+
# Default: `docs`
50+
docs_path: docs
51+
52+
# Include README.md from repository root
53+
# Default: `true`
54+
include_readme: true
55+
```
56+
57+
<!-- usage:end -->
58+
<!-- inputs:start -->
59+
60+
## Inputs
61+
62+
### Workflow Call Inputs
63+
64+
| **Input** | **Description** | **Required** | **Type** | **Default** |
65+
| -------------------- | ---------------------------------------------------- | ------------ | ----------- | ----------- |
66+
| **`docs_path`** | Path to documentation in source repository (default: docs) | **false** | **string** | `docs` |
67+
| **`include_readme`** | Include README.md from repository root | **false** | **boolean** | `true` |
68+
69+
<!-- inputs:end -->
70+
<!-- secrets:start -->
71+
72+
## Secrets
73+
74+
| **Secret** | **Description** | **Required** |
75+
| ----------------------- | ---------------------------------------------------------------------------- | ------------ |
76+
| **`PUBLIC_DOCS_TOKEN`** | GitHub token with write access to trigger repository_dispatch in public-docs | **true** |
77+
78+
<!-- secrets:end -->
79+
<!-- outputs:start -->
80+
<!-- outputs:end -->
81+
<!-- examples:start -->
82+
<!-- examples:end -->
83+
<!-- contributing:start -->
84+
85+
## Contributing
86+
87+
Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/public-docs/blob/main/CONTRIBUTING.md) for more details.
88+
89+
<!-- contributing:end -->
90+
<!-- security:start -->
91+
<!-- security:end -->
92+
<!-- license:start -->
93+
94+
## License
95+
96+
This project is licensed under the MIT License.
97+
98+
SPDX-License-Identifier: MIT
99+
100+
Copyright © 2025 hoverkraft-tech
101+
102+
For more details, see the [license](http://choosealicense.com/licenses/mit/).
103+
104+
<!-- license:end -->
105+
<!-- generated:start -->
106+
107+
---
108+
109+
This documentation was automatically generated by [CI Dokumentor](https://github.com/hoverkraft-tech/ci-dokumentor).
110+
111+
<!-- generated:end -->

0 commit comments

Comments
 (0)