Skip to content

Commit

Permalink
ci: preview docs
Browse files Browse the repository at this point in the history
Signed-off-by: msclock <msclock@qq.com>
  • Loading branch information
msclock committed Nov 3, 2023
1 parent 2d6c888 commit b78a3f4
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/documentation-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://github.com/readthedocs/actions/tree/main/preview

name: readthedocs/actions

on:
pull_request_target:
types:
- opened

permissions:
pull-requests: write

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.ref }}

jobs:

preview-rtd:
runs-on: ubuntu-latest
steps:
- uses: readthedocs/actions/preview@v1
with:
project-slug: ${{ github.repository }}
51 changes: 51 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
apt_packages:
- doxygen
- gcc
- g++
- git
- bash
- lcov
- openjdk-19-jre
os: ubuntu-22.04
tools:
python: '3.11'
jobs:
post_create_environment:
- >-
git clone
-c core.eol=lf
-c core.autocrlf=false
-c safe.directory="/tmp/vcpkg"
-c fsck.zeroPaddedFilemode=ignore
-c fetch.fsck.zeroPaddedFilemode=ignore
-c receive.fsck.zeroPaddedFilemode=ignore https://github.com/microsoft/vcpkg /tmp/vcpkg
- /tmp/vcpkg/bootstrap-vcpkg.sh
- /tmp/vcpkg/vcpkg --version
- pip install cmake ninja
pre_build:
- VCPKG_ROOT=/tmp/vcpkg cmake -S . --preset=x64-Debug-GNUC
- cmake --build out/build/x64-Debug-GNUC --parallel 8 --target ccov-all
post_build:
- cp out/build/x64-Debug-GNUC/cpp-scaffold_docs $READTHEDOCS_OUTPUT/html/ -r


# Build documentation in the docs/ directory with Sphinx
sphinx:
# Fail on all warnings to avoid broken references
fail_on_warning: true

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt

0 comments on commit b78a3f4

Please sign in to comment.