docs.yml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. name: Docs
  17. on:
  18. pull_request:
  19. paths:
  20. - '.github/workflows/docs.yml'
  21. - '**/*.md'
  22. - 'docs/**'
  23. - '.dlc.json'
  24. schedule:
  25. - cron: '0 18 * * *' # TimeZone: UTC 0
  26. concurrency:
  27. group: doc-${{ github.event.pull_request.number || github.ref }}
  28. cancel-in-progress: true
  29. jobs:
  30. style:
  31. timeout-minutes: 10
  32. runs-on: ubuntu-latest
  33. steps:
  34. - uses: actions/checkout@v2
  35. - name: Style Check
  36. run: ./mvnw spotless:check
  37. img-check:
  38. timeout-minutes: 15
  39. runs-on: ubuntu-latest
  40. defaults:
  41. run:
  42. working-directory: docs
  43. steps:
  44. - uses: actions/checkout@v2
  45. - name: Set up Python 3.9
  46. uses: actions/setup-python@v2
  47. with:
  48. python-version: 3.9
  49. - name: Run Dev Relative Reference
  50. run: python img_utils.py -v dev-syntax
  51. - name: Run Image Check
  52. run: python img_utils.py -v check
  53. dead-link:
  54. if: (github.event_name == 'schedule' && github.repository == 'apache/dolphinscheduler') || (github.event_name != 'schedule')
  55. runs-on: ubuntu-latest
  56. timeout-minutes: 30
  57. steps:
  58. - uses: actions/checkout@v2
  59. - run: sudo npm install -g markdown-link-check@3.10.0
  60. # NOTE: Change command from `find . -name "*.md"` to `find . -not -path "*/node_modules/*" -not -path "*/.tox/*" -name "*.md"`
  61. # if you want to run check locally
  62. - run: |
  63. for file in $(find . -name "*.md"); do
  64. markdown-link-check -c .dlc.json -q "$file"
  65. done
  66. result:
  67. name: Docs
  68. runs-on: ubuntu-latest
  69. timeout-minutes: 30
  70. needs:
  71. - style
  72. - img-check
  73. - dead-link
  74. if: success()
  75. steps:
  76. - name: success
  77. run: |
  78. echo "Docs check success"
  79. exit 0