Skip to content

Commit

Permalink
Merge pull request #193 from fktn-k/feature/179_migrate_ghpage_conten…
Browse files Browse the repository at this point in the history
…t_with_mkdocs

#179 Migrate the gh-page content with MkDocs
  • Loading branch information
fktn-k authored Nov 5, 2023
2 parents 3068884 + 215122d commit 0c1ba1e
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 2,859 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,47 @@
name: PublishDocs

# make the documentation up to date with the develop branch
on:
push:
branches:
- main
- develop
paths:
- docs/mkdocs/**
workflow_dispatch:

# no cancellation during uploads to avoid broken publications
concurrency:
group: documentation
cancel-in-progress: false

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
if: github.repository == 'fktn-k/fkYAML'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install graphviz and doxygen
run: |
sudo apt update
sudo apt install -y --no-install-recommends graphviz doxygen
- name: Configure CMake
run: make doxygen
- name: Build documentation
run: make build -C docs/mkdocs

- name: Setup Pages
uses: actions/configure-pages@v3

- name: Upload API documents
uses: actions/upload-pages-artifact@v2
with:
path: ${{github.workspace}}/build_doxygen/doxygen/html
path: ${{github.workspace}}/docs/mkdocs/site

deploy:
if: github.repository == 'fktn-k/fkYAML'
needs: build
environment:
name: github-pages
Expand Down
9 changes: 0 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,6 @@ if(FK_YAML_BUILD_TEST OR FK_YAML_BUILD_ALL_TEST)
add_subdirectory(test)
endif()

##################################
# Generate API documentation #
##################################

if(FK_YAML_RUN_DOXYGEN)
set(FK_YAML_DOXYGEN_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/doxygen")
add_subdirectory(docs)
endif()

#######################
# Install package #
#######################
Expand Down
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ all:
@echo "clang-sanitizers - check whether no runtime issue is detected while running the unit test app."
@echo "clang-tidy - check whether source files detect no issues during static code analysis."
@echo "cmake-format - check whether CMake scripts are well formatted."
@echo "doxygen - generate the API documentation for the project with Doxygen."
@echo "html-coverage - generate HTML coverage report."
@echo "iwyu - check whether source files are each self-contained."
@echo "lcov-coverage - generate coverage data with lcov."
Expand Down Expand Up @@ -82,15 +81,6 @@ valgrind:
cmake-format:
cmake-format $(CMAKE_SCRIPTS) -i -c .cmake-format.yaml

#####################
# Documentation #
#####################

# pre-requisites: doxygen, graphviz
doxygen:
cmake -B build_doxygen -S . -DFK_YAML_RUN_DOXYGEN=ON
cmake --build build_doxygen --target doxygen -j $(JOBS)

###############
# Version #
###############
Expand Down Expand Up @@ -164,6 +154,5 @@ clean:
build_clang_sanitizers \
build_clang_tidy \
build_coverage \
build_doxygen \
build_iwyu \
build_valgrind
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/cded6969c7344ea5be60ab472e13000f)](https://app.codacy.com/gh/fktn-k/fkYAML/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![CodeQL](https://github.com/fktn-k/fkYAML/workflows/CodeQL/badge.svg)](https://github.com/fktn-k/fkYAML/actions?query=workflow%3ACodeQL)
[![GitHub Releases](https://img.shields.io/github/release/fktn-k/fkYAML.svg)](https://github.com/fktn-k/fkYAML/releases/latest)
[![Documentation](https://img.shields.io/badge/docs-here-blue.svg)](https://fktn-k.github.io/fkYAML)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/fktn-k/fkYAML/develop/LICENSE.txt)
[![GitHub Issues](https://img.shields.io/github/issues/fktn-k/fkYAML.svg)](https://github.com/fktn-k/fkYAML/issues)
[![REUSE status](https://api.reuse.software/badge/github.com/fktn-k/fkYAML)](https://api.reuse.software/info/github.com/fktn-k/fkYAML)
Expand Down Expand Up @@ -398,9 +399,10 @@ Thanks a lot!
- [**cmake-format**](https://github.com/cheshirekow/cmake_format) as a linter for CMake scripts.
- [**Coveralls**](https://coveralls.io/) to measure [code coverage](https://coveralls.io/github/fktn-k/fkYAML?branch=develop).
- [**Catch2**](https://github.com/catchorg/Catch2) as a unit-test framework.
- [**Doxygen**](https://www.doxygen.nl/) as the API documentation generator.
- [**github-changelog-generator**](https://github.com/github-changelog-generator/github-changelog-generator) to generate the [CHANGELOG.md](https://github.com/fktn-k/fkYAML/tree/develop/CHANGELOG.md) file.
- [**include-what-you-use**](https://github.com/include-what-you-use/include-what-you-use) to check the fkYAML library source files are each self-contained.
- [**lcov**](https://ltp.sourceforge.net/coverage/lcov.php) to generate coverage data.
- [**Material for MkDocs**](https://squidfunk.github.io/mkdocs-material/) for the style of the documentation site.
- [**MkDocs**](https://www.mkdocs.org/) as the documentation site generator.
- [**reuse-tool**](https://github.com/fsfe/reuse-tool) to generate license/copyright headers in source files to meet [REUSE software](https://reuse.software/) recommendations.
- [**Valgrind**](https://valgrind.org/) for runtime memory leak check.
14 changes: 0 additions & 14 deletions docs/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 0c1ba1e

Please sign in to comment.