aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-03-10 12:51:15 +0500
committerEgor Tensin <Egor.Tensin@gmail.com>2022-03-10 13:14:29 +0500
commit232cb5b1c678ae52133904779b288a436ef36522 (patch)
treebe0c369b123bdb2aeb8e724ebae322027b67ba68
parentadd Doxygen docs (diff)
downloadwinapi-common-232cb5b1c678ae52133904779b288a436ef36522.tar.gz
winapi-common-232cb5b1c678ae52133904779b288a436ef36522.zip
workflows/ci: publish docs to GitHub Pages
-rw-r--r--.github/workflows/ci.yml46
-rw-r--r--Makefile2
-rw-r--r--README.md2
3 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3f49eb1..10daeee 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -85,3 +85,49 @@ jobs:
${{ runner.workspace }}/build/**/*_report.txt
if-no-files-found: error
if: always() && runner.os == 'Windows'
+
+ docs:
+ needs: [lint, build]
+ runs-on: ubuntu-latest
+ name: Docs
+ if: github.ref == 'refs/heads/master'
+ env:
+ TOOLSET: mingw
+ PLATFORM: auto
+ CONFIGURATION: Debug
+ BOOST_VERSION: 1.65.0
+ CMAKE_FLAGS: -D WINAPI_COMMON_TESTS=OFF
+ steps:
+ # This is rather stupid. In order to build Doxygen docs, I need a working
+ # CMake build directory, so I assume that means I need to pretty much
+ # build the project. TODO: research if this is possible without having a
+ # Doxyfile.
+ - name: Checkout
+ uses: actions/checkout@v2
+ with:
+ submodules: recursive
+ - name: Cache Boost
+ uses: actions/cache@v2
+ with:
+ path: '${{ runner.workspace }}/build/boost_*.tar.gz'
+ key: 'boost_${{ env.BOOST_VERSION }}'
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ - name: Set up MinGW
+ uses: egor-tensin/setup-mingw@v2
+ - name: Install Doxygen
+ run: |
+ sudo apt-get update
+ sudo DEBIAN_FRONTEND=noninteractive apt-get install -yq --no-install-recommends doxygen
+ - name: Build Boost
+ run: make deps
+ - name: Build
+ run: make install
+ - name: Build docs
+ run: make docs
+ - name: Publish to GitHub Pages
+ uses: JamesIves/github-pages-deploy-action@4.1.5
+ with:
+ branch: gh-pages
+ folder: ../build/cmake/html
+ single-commit: true
diff --git a/Makefile b/Makefile
index 64c45fd..18b6f52 100644
--- a/Makefile
+++ b/Makefile
@@ -85,9 +85,11 @@ xdg-open := $(shell command -v xdg-open 2> /dev/null)
.PHONY: docs
docs:
cmake --build '$(call escape,$(cmake_dir))' --target docs
+ifndef CI
ifdef xdg-open
xdg-open '$(call escape,$(cmake_dir))/html/index.html' &> /dev/null
endif
+endif
clang-tidy := run-clang-tidy
ifeq (1,$(shell test -e /usr/share/clang/run-clang-tidy.py && echo 1))
diff --git a/README.md b/README.md
index 67212e8..1e1a261 100644
--- a/README.md
+++ b/README.md
@@ -28,6 +28,8 @@ Build & display the documentation using
make docs
+View the online documentation at https://egor-tensin.github.io/winapi-common/.
+
License
-------