From 878b73c89f377788862ffe3f20436f2d3ed80fa7 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 26 Sep 2021 18:06:42 +0300 Subject: workflows: publish docs to GitHub Pages --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3833293..8d01b5b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,10 @@ on: - cron: '30 5 * * 0' workflow_dispatch: +env: + BOOST_VERSION: 1.72.0 + CMAKE_FLAGS: -D WINAPI_UTF8_TESTS=ON + jobs: lint: runs-on: ubuntu-latest @@ -43,8 +47,6 @@ jobs: TOOLSET: '${{ matrix.toolset }}' PLATFORM: '${{ matrix.platform }}' CONFIGURATION: '${{ matrix.configuration }}' - BOOST_VERSION: 1.72.0 - CMAKE_FLAGS: -D WINAPI_UTF8_TESTS=ON steps: - name: Checkout uses: actions/checkout@v2 @@ -75,3 +77,41 @@ jobs: - name: Test run: make test if: 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 + CMAKE_FLAGS: -D WINAPI_UTF8_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: 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 + 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 -- cgit v1.2.3