This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 0cbd219  [ci] Add CI failed when any change in docs (#757)
0cbd219 is described below

commit 0cbd219954d6d35338f89799af377b9b6cb48b78
Author: Jiajie Zhong <[email protected]>
AuthorDate: Sat Apr 2 18:36:52 2022 +0800

    [ci] Add CI failed when any change in docs (#757)
    
    * [ci] Add CI failed when any change in docs
    
    * Change docs check
    
    * revert this before merge
    
    * change ci
    
    * Revert "revert this before merge"
    
    This reverts commit 1d8201a4
---
 .asf.yaml                          |  1 +
 .github/workflows/change-docs.yaml | 48 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 49 insertions(+)

diff --git a/.asf.yaml b/.asf.yaml
index eeccd05..f1d55bf 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -40,6 +40,7 @@ github:
       required_status_checks:
         contexts:
           - CheckDeadLinks
+          - docs-check
       required_pull_request_reviews:
         dismiss_stale_reviews: true
         required_approving_review_count: 1
diff --git a/.github/workflows/change-docs.yaml 
b/.github/workflows/change-docs.yaml
new file mode 100644
index 0000000..e4b4f9a
--- /dev/null
+++ b/.github/workflows/change-docs.yaml
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Docs
+
+on:
+  pull_request:
+    branches:
+      - master
+
+env:
+  DOCS_FLAG: ^docs
+
+concurrency:
+  group: docs-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  # We do not accept anyone who wants to make some change to directory `docs`, 
you should
+  # consider changing the content in 
https://github.com/apache/dolphinscheduler-website/tree/history-docs
+  # if you want to change the history docs before DolphinScheduler 
3.0.0-alpha. Or changing the content
+  # in https://github.com/apache/dolphinscheduler/tree/dev/docs for the latest 
docs.
+  docs-check:
+    timeout-minutes: 5
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v3
+      - name: Get Branch origin/dev
+        run: |
+          git fetch --no-tags --prune --depth=1 origin master
+      - name: Fail When Docs Dir Change
+        run: |
+          if git diff --name-only origin/master HEAD | grep -q -E "${{ 
env.DOCS_FLAG }}"; then
+            exit 1
+          fi

Reply via email to