mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 03:21:34 +00:00
Fix doc build
This commit is contained in:
parent
735a613821
commit
b5c8fd783c
2
.github/workflows/doc.yml
vendored
2
.github/workflows/doc.yml
vendored
@ -33,6 +33,6 @@ jobs:
|
||||
env:
|
||||
KEY: ${{secrets.KEY}}
|
||||
run: |
|
||||
cmake .
|
||||
cmake $GITHUB_WORKSPACE
|
||||
make doc
|
||||
# $GITHUB_WORKSPACE/support/build-docs.py
|
||||
|
@ -449,7 +449,8 @@ function(add_doc_target)
|
||||
add_custom_target(
|
||||
doc
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR}/support
|
||||
${CMAKE_COMMAND}
|
||||
-E env PYTHONPATH=${CMAKE_CURRENT_SOURCE_DIR}/support/python
|
||||
${MKDOCS} build -f ${CMAKE_CURRENT_SOURCE_DIR}/support/mkdocs.yml
|
||||
--site-dir ${CMAKE_CURRENT_BINARY_DIR}/site
|
||||
--no-directory-urls
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
import os, subprocess, sys
|
||||
|
||||
dirname = os.path.dirname(__file__)
|
||||
dirname = os.path.join(os.path.dirname(__file__), 'python')
|
||||
|
||||
# Set PYTHONPATH for the mkdocstrings handler.
|
||||
env = os.environ.copy()
|
||||
@ -11,4 +11,7 @@ path = env.get('PYTHONPATH')
|
||||
env['PYTHONPATH'] = (path + ':' if path else '') + dirname
|
||||
|
||||
config_path = os.path.join(dirname, 'mkdocs.yml')
|
||||
subprocess.run(['mkdocs'] + sys.argv[1:] + ['-f', config_path], env=env)
|
||||
args = sys.argv[1:]
|
||||
if 'build' in args:
|
||||
args += ['-f', config_path]
|
||||
subprocess.run(['mkdocs'] + args, env=env)
|
Loading…
Reference in New Issue
Block a user