From 4c32cca1054a3ffe34b90dd25185cd2ad7ab068f Mon Sep 17 00:00:00 2001 From: Hassan Abouelela Date: Sun, 29 May 2022 23:36:59 +0400 Subject: Check Out The Entire Repository For Multiversion Signed-off-by: Hassan Abouelela --- .github/workflows/docs.yaml | 4 +++- docs/conf.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 82344abc..7bc0102d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -49,6 +49,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 # We need to check out the entire repository to find all tags - name: Install Python Dependencies uses: HassanAbouelela/actions/setup-python@setup-python_v1.1.0 @@ -64,7 +66,7 @@ jobs: - name: Build All Doc Versions run: sphinx-multiversion docs docs/build -n -j auto env: - BUILD_DOCS_FOR_HEAD: True + BUILD_DOCS_FOR_HEAD: ${{ github.event_name == 'pull_request' }} - name: Upload Build Artifact uses: actions/upload-artifact@v2 diff --git a/docs/conf.py b/docs/conf.py index 386303dd..e4293486 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -210,7 +210,7 @@ smv_branch_whitelist = "main" if os.getenv("BUILD_DOCS_FOR_HEAD", "False").lower() == "true": try: branch = git.Repo(PROJECT_ROOT).active_branch.name - logger.info(f"Adding branch {branch} to build whitelist") + logger.info(f"Adding branch {branch} to build whitelist.") smv_branch_whitelist = f"main|{branch}" except git.InvalidGitRepositoryError: pass -- cgit v1.2.3