Skip to content

Commit 738f801

Browse files
docs: add initial content
1 parent efab143 commit 738f801

File tree

3 files changed

+127
-3
lines changed

3 files changed

+127
-3
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Update Submodules and Publish
2+
3+
on:
4+
workflow_dispatch:
5+
repository_dispatch:
6+
types: [update-submodules]
7+
push:
8+
branches:
9+
- gh-pages
10+
11+
concurrency:
12+
group: ${{ github.workflow }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: write
17+
18+
jobs:
19+
update-submodules:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout the repository
23+
uses: actions/checkout@v4
24+
with:
25+
ref: gh-pages
26+
submodules: recursive
27+
fetch-depth: 0
28+
29+
- name: Set Git user identity
30+
run: |
31+
git config --global user.name "Calypsonet Bot"
32+
git config --global user.email "${{ github.repository }}[email protected]"
33+
34+
- name: Update Git submodules
35+
id: commit
36+
run: |
37+
git submodule update --init --recursive --remote
38+
git add .
39+
COMMIT_MSG="Update submodules to latest commit"
40+
if [[ -n $(git status --porcelain) ]]; then
41+
git commit -m "$COMMIT_MSG"
42+
echo "changes_detected=true" >> $GITHUB_ENV
43+
else
44+
echo "No changes to commit"
45+
echo "changes_detected=false" >> $GITHUB_ENV
46+
fi
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
50+
- name: Show the version of the submodules
51+
run: git submodule foreach --recursive 'git rev-parse HEAD'
52+
53+
- name: Push changes if any
54+
if: env.changes_detected == 'true'
55+
run: |
56+
git push origin HEAD:gh-pages
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

LICENSE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ No third-party beneficiary rights are created under this Agreement.
261261

262262
Exhibit A - Form of Secondary Licenses Notice
263263

264-
"This Source Code may also be made available under the following
265-
Secondary Licenses when the conditions for such availability set forth
264+
"This Source Code may also be made available under the following
265+
Secondary Licenses when the conditions for such availability set forth
266266
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s),
267267
version(s), and exceptions or additional permissions here}."
268268

README.md

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,67 @@
1-
# calypsonet-terminal-api-docs
1+
# Calypso Networks Association Terminal API documentation
2+
3+
[![License](https://img.shields.io/badge/License-EPL_2.0-red.svg)](https://opensource.org/licenses/EPL-2.0)
4+
5+
Central repository for design documentation of all **Calypso Terminal API** libraries, including **UML diagrams** and conception documents.
6+
7+
## Repository Structure
8+
9+
This repository uses two main branches:
10+
- `main`: Contains the repository configuration and workflows
11+
- `gh-pages`: Contains the actual documentation and Jekyll configuration, published at [https://docs.terminal-api.calypsonet.org/](https://docs.terminal-api.calypsonet.org/)
12+
13+
## Managing Documentation Sources
14+
15+
### Adding a New Library Documentation
16+
17+
To add documentation for a new library:
18+
19+
```bash
20+
# Switch to `doc` branch
21+
git checkout doc
22+
23+
# Add the submodule pointing to the doc branch
24+
git submodule add -b doc https://github.com/calypsonet/[library-name].git [library-name]
25+
26+
# Commit the changes
27+
git add .
28+
git commit -m "feat: add documentation for [library-name]"
29+
git push origin doc
30+
```
31+
32+
### Removing a Library Documentation
33+
34+
To remove documentation for a library:
35+
36+
```bash
37+
# Switch to `gh-pages` branch
38+
git checkout gh-pages
39+
40+
# Remove the submodule
41+
git submodule deinit -f [library-name]
42+
rm -rf .git/modules/[library-name]
43+
git rm -f [library-name]
44+
45+
# Commit the changes
46+
git commit -m "feat: remove documentation for [library-name]"
47+
git push origin gh-pages
48+
```
49+
50+
## Automatic Updates
51+
52+
This repository includes a GitHub Action that automatically updates all submodules to their latest commits. The action:
53+
54+
- Runs on manual trigger, repository dispatch event, or push to gh-pages
55+
- Updates all submodules recursively
56+
- Commits and pushes changes if updates are detected
57+
- Uses a dedicated bot account for commits
58+
59+
You can view the action workflow in [`/.github/workflows/update-submodules.yml`](https://github.com/calypsonet/terminal-api-doc/blob/main/.github/workflows/update-submodules.yml).
60+
61+
## Contributing
62+
63+
Please read our [contribution guidelines](https://terminal-api.calypsonet.org/community/contributing/) before submitting any changes.
64+
65+
## License
66+
67+
This project is licensed under the Eclipse Public License v. 2.0. See [LICENSE](LICENSE) for details.

0 commit comments

Comments
 (0)