Browse Source

Updated Github CI for doc deployment

nick80 4 months ago
parent
commit
003e5571e7
2 changed files with 11 additions and 3 deletions
  1. 6 2
      .github/workflows/check_docs.yml
  2. 5 1
      .github/workflows/deploy_docs.yml

+ 6 - 2
.github/workflows/check_docs.yml

@@ -2,6 +2,7 @@ name: 📖 Check docs
 run-name: 📖 Check docs ${{ github.sha }}
 
 on:
+  workflow_call:
   pull_request:
     paths:
       - 'manual/**'
@@ -31,15 +32,18 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v3
         with:
-          fetch-depth: 2
+          fetch-depth: 0
           token: ${{ secrets.GITHUB_TOKEN }}
           submodules: true
           ref: ${{ github.head_ref }}
-      - name: Get changed files
+
+      - name: Fetch master and get changed files
         id: changed-files
         run: |
           git config --global --add safe.directory /__w/manticoresearch/manticoresearch
+          git fetch origin master:master 
           echo "changed_files=$(git diff-tree --no-commit-id --name-only -r HEAD^1 HEAD | xargs)" >> $GITHUB_OUTPUT
+
       - name: Get changed doc filepathes
         id: doc-filepathes
         run: |

+ 5 - 1
.github/workflows/deploy_docs.yml

@@ -14,6 +14,9 @@ env:
   DOCS_AUTOCOMMIT_TITLE: Docs_examples_update
 
 jobs:
+  check:
+    uses: ./.github/workflows/check_docs.yml
+    secrets: inherit
   commit_info:
     name: Commit info
     runs-on: ubuntu-22.04
@@ -27,6 +30,7 @@ jobs:
 
   docs_autocommit_check:
     name: Check for doc deployment autocommits
+    needs: [check]
     runs-on: ubuntu-22.04
     outputs:
       res: ${{ steps.check.outputs.res }}
@@ -91,5 +95,5 @@ jobs:
         if: always()
         uses: manticoresoftware/upload_artifact_with_retries@v4
         with:
-          name: Docs error artifact
+          name: Docs deploy error artifact
           path: $DOCS_ERRORS_DIR