mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
Merge pull request #4 from kvedala/autodoc
Automatic documentation build on commit to master
This commit is contained in:
commit
b8500097da
35
.github/workflows/gh-pages.yml
vendored
Normal file
35
.github/workflows/gh-pages.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Doxygen CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
BUILD_SHA: ${GITHUB_SHA}
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install requirements
|
||||
run: sudo apt -qq install doxygen graphviz ninja-build
|
||||
- name: configure
|
||||
run: cmake -G Ninja -B ./build -S .
|
||||
- name: build
|
||||
run: cmake --build build -t doc
|
||||
- name: gh-pages
|
||||
uses: actions/checkout@master
|
||||
with:
|
||||
ref: "gh-pages"
|
||||
clean: false
|
||||
- name: Move & Commit files
|
||||
run: |
|
||||
mv ./build/html/*.* . && rm -rf ./build && rm-rf function_timer && ls -lah
|
||||
git config --global user.name github-actions
|
||||
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
|
||||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
|
||||
git add *.*
|
||||
git commit -am "Documentation for ${BUILD_SHA}" || true
|
||||
git push --force || true
|
@ -11,18 +11,19 @@ cmake_policy(SET CMP0054 NEW)
|
||||
cmake_policy(SET CMP0057 NEW)
|
||||
find_package(Doxygen OPTIONAL_COMPONENTS dot dia)
|
||||
if(DOXYGEN_FOUND)
|
||||
set(DOXYGEN_GENERATE_HTML YES)
|
||||
set(DOXYGEN_GENERATE_ YES)
|
||||
set(DOXYGEN_GENERATE_MAN NO)
|
||||
set(DOXYGEN_USE_MATHJAX YES)
|
||||
set(DOCYGEN_GENERATE_TREEVIEW YES)
|
||||
set(DOXYGEN_GENERATE_HTML YES)
|
||||
set(DOXYGEN_INLINE_SOURCES YES)
|
||||
set(DOXYGEN_CREATE_SUBDIRS YES)
|
||||
set(DOCYGEN_GENERATE_TREEVIEW YES)
|
||||
set(DOXYGEN_STRIP_CODE_COMMENTS NO)
|
||||
set(DOXYGEN_OPTIMIZE_OUTPUT_FOR_C YES)
|
||||
if(Doxygen_dot_FOUND)
|
||||
set(DOXYGEN_HAVE_DOT YES)
|
||||
set(DOXYGEN_CALL_GRAPH YES)
|
||||
set(DOXYGEN_DOT_IMAGE_FORMAT "svg")
|
||||
set(DOXYGEN_INTERACTIVE_SVG YES)
|
||||
set(DOXYGEN_DOT_IMAGE_FORMAT "svg")
|
||||
endif()
|
||||
|
||||
doxygen_add_docs(
|
||||
|
Loading…
Reference in New Issue
Block a user