remove *.html from generated GitHub Pages
@@ -101,13 +101,18 @@ def push_documents_to_gh_pages(*, src_dir: pathlib.Path, dst_branch: str = 'gh-p
def subcommand_docs() -> None:
+ if 'GITHUB_ACTION' in os.environ:
+ if os.environ['GITHUB_REF'] == 'refs/heads/master':
logger.info('generate documents...')
- onlinejudge_verify.docs.main()
+ onlinejudge_verify.docs.main(html=False)
- if 'GITHUB_ACTION' in os.environ and os.environ['GITHUB_REF'] == 'refs/heads/master':
logger.info('upload documents...')
push_documents_to_gh_pages(src_dir=pathlib.Path('md-output'))
+ else:
+ logger.info('generate documents...')
+ onlinejudge_verify.docs.main(html=True)
+
def main(args: Optional[List[str]] = None) -> None:
basicConfig(level=DEBUG)
