8000 YT-CPPAP-41: Documentation deployment refinement by SpectraL519 · Pull Request #75 · SpectraL519/cpp-ap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

YT-CPPAP-41: Documentation deployment refinement #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 47 additions & 5 deletions .github/workflows/documentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,20 @@ jobs:
python-version: "3.12"

- name: Install dependencies
run: sudo apt install doxygen -y
run: |
sudo apt install doxygen -y
pip install beautifulsoup4

- name: Validate the project version
run: |
VERSION=$(python3 scripts/check_version.py)
echo "project version = $VERSION"

- name: Run doxygen
run: doxygen Doxyfile
continue-on-error: false
run: |
doxygen Doxyfile
python3 scripts/postprocess_doxyhtml.py ./documentation

- name: Validate output
run: test -d documentation && test -f documentation/index.html
Expand All @@ -58,16 +63,28 @@ jobs:
python-version: "3.12"

- name: Install dependencies
run: sudo apt install doxygen -y
run: |
sudo apt install doxygen -y
pip install beautifulsoup4

- name: Extract the project version
- name: Extract and validate the project version
continue-on-error: false
run: |
VERSION=$(python3 scripts/check_version.py)
echo "project version = $VERSION"
VERSION_TAG="${GITHUB_REF##*/}"
echo "git version tag = $VERSION_TAG"
if [[ "$VERSION_TAG" != "v$VERSION" ]]; then
echo "Error: Tag missmatch: git version tag = $VERSION_TAG, project version: v$VERSION"
exit 1
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV

- name: Run doxygen
run: doxygen Doxyfile
continue-on-error: false
run: |
doxygen Doxyfile
python3 scripts/postprocess_doxyhtml.py ./documentation

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
Expand All @@ -76,3 +93,28 @@ jobs:
publish_dir: ./documentation
publish_branch: gh-pages
destination_dir: ${{ env.VERSION }}

- name: Deploy documantation as latest (setup)
if: ${{ success() }}
run: |
CURRENT_VERSION="v${VERSION}"
echo "Current version: $CURRENT_VERSION"
git fetch --tags --force
ALL_TAGS=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V)
LATEST_TAG=$(echo "$ALL_TAGS" | tail -n 1)
echo "Latest tag: $LATEST_TAG"
if [ "$CURRENT_VERSION" = "$LATEST_TAG" ]; then
echo "Current tag is the latest. Deploying to 'latest/'..."
echo "DEPLOY_LATEST=true" >> $GITHUB_ENV
else
echo "Current tag is NOT the latest. Skipping deployment to 'latest/'."
fi

- name: Deploy to GitHub Pages as 'latest'
if: env.DEPLOY_LATEST == 'true'
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./documentation
publish_branch: gh-pages
destination_dir: latest
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else()
endif()

project(cpp-ap
VERSION 2.2.5
VERSION 2.2.6
DESCRIPTION "Command-line argument parser for C++20"
HOMEPAGE_URL "https://github.com/SpectraL519/cpp-ap"
LANGUAGES CXX
Expand Down
6 changes: 3 additions & 3 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ DOXYFILE_ENCODING = UTF-8
# title of most generated pages and in a few other places.
# The default value is: My Project.

PROJECT_NAME = "CPP-AP"
PROJECT_NAME = CPP-AP

# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 2.2.5
PROJECT_NUMBER = 2.2.6

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down Expand Up @@ -1315,7 +1315,7 @@ HTML_STYLESHEET =
# documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css
HTML_EXTRA_STYLESHEET = doxygen-awesome-css/doxygen-awesome.css doxygen-ext-stylesheet.css

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MIT License
#### MIT License

Copyright (c) 2023-2025 Jakub Musiał and other contributors
https://github.com/SpectraL519/cpp-ap
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# CPP-AP-2
<h1>
CPP-AP-2
<a href="https://github.com/SpectraL519/cpp-ap" target="_blank">
<i class="fa fa-github" style="font-size: 1.3em; margin-left: 6px; position: relative; top: -0.08em;"></i>
</a>
</h1>

Command-line argument parser for C++20

Expand Down Expand Up @@ -28,7 +33,7 @@ Command-line argument parser for C++20

## Related Pages

- [Tutorial](/docs/tutorial.md)
- [Tutorial](/docs/tutorial.md#tutorial)
- [Setting Up CPP-AP](/docs/tutorial.md#setting-up-cpp-ap)
- [CMake Integration](/docs/tutorial.md#cmake-integration)
- [Downloading the Library](/docs/tutorial.md#downloading-the-library)
Expand All @@ -39,10 +44,10 @@ Command-line argument parser for C++20
- [Parsing Arguments](/docs/tutorial.md#parsing-arguments)
- [Retrieving Argument Values](/docs/tutorial.md#retrieving-argument-values)
- [Examples](/docs/tutorial.md#examples)
- [Dev notes](/docs/dev_notes.md)
- [Dev notes](/docs/dev_notes.md#dev-notes)
- [Building and testing](/docs/dev_notes.md#building-and-testing)
- [Formatting](/docs/dev_notes.md#formatting)
- [Documentation](https://spectral519.github.io/cpp-ap/2.2.5/)
- [Documentation](/docs/dev_notes.md#documentation)

<br />

Expand All @@ -61,4 +66,4 @@ Command-line argument parser for C++20

## License

The `CPP-AP` project uses the [MIT License](https://mit-license.org/) which can be found in the [LICENSE.md](/LICENSE.md) file
The `CPP-AP` project uses the [MIT License](https://mit-license.org/) which can be found in the [LICENSE](/LICENSE.md#mit-license) file
17 changes: 13 additions & 4 deletions docs/dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,15 @@ python scripts/format.py --help

## Documentation

> [!INFO]
> You can view the online documentation [here](https://spectral519.github.io/cpp-ap/).
> [!NOTE]
>
> You can view the online documentation for the latest version [here](https://spectral519.github.io/cpp-ap/latest/).
>
> **NOTE:** The online documentation is available only for versions `>= 2.2.5`.
> To view the documentation for the previous versions use the following URL pattern:
> ```
> https://spectral519.github.io/cpp-ap/<version>
> ```
> Please keep in mind that the online documentation is available only for versions `>= 2.2.5` - for older versions the documentation has to be built locally.

The documentation for this project can be generated using Doxygen, styled with a custom [fork](https://github.com/SpectraL519/doxygen-awesome-css/tree/theme-alignment) of the [doxygen-awesome-css](https://github.com/jothepro/doxygen-awesome-css) theme.

Expand All @@ -87,4 +92,8 @@ This should create a `documentation` directory containing the project's document

> [!NOTE]
>
> Markdown links to other files might not be rendered properly in the Doxygen output, however the referenced pages will still be generated in the *Related Pages* section.
> Markdown links to other files or sections and the GFM-style callouts might not be rendered properly in the Doxygen output. To fix these issues you can run the postprocessing script:
> ```
> python3 scripts/postprocess_doxyhtml.py ./documentation
> ```
> or you can view those documents by using the *Related Pages* section on the navigation bar.
Loading
0