docs.yml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. schedule:
  24. - cron: '0 18 * * *' # TimeZone: UTC 0
  25. concurrency:
  26. group: doc-${{ github.event.pull_request.number || github.ref }}
  27. cancel-in-progress: true
  28. jobs:
  29. img-check:
  30. name: Image Check
  31. timeout-minutes: 15
  32. runs-on: ubuntu-latest
  33. defaults:
  34. run:
  35. working-directory: docs
  36. steps:
  37. - uses: actions/checkout@v2
  38. - name: Set up Python 3.9
  39. uses: actions/setup-python@v2
  40. with:
  41. python-version: 3.9
  42. - name: Run Dev Relative Reference
  43. run: python img_utils.py -v dev-syntax
  44. - name: Run Image Check
  45. run: python img_utils.py -v check
  46. dead-link:
  47. name: Dead Link
  48. if: (github.event_name == 'schedule' && github.repository == 'apache/dolphinscheduler') || (github.event_name != 'schedule')
  49. runs-on: ubuntu-latest
  50. timeout-minutes: 30
  51. steps:
  52. - uses: actions/checkout@v2
  53. - run: sudo npm install -g markdown-link-check@3.10.0
  54. # NOTE: Change command from `find . -name "*.md"` to `find . -not -path "*/node_modules/*" -not -path "*/.tox/*" -name "*.md"`
  55. # if you want to run check locally
  56. - run: |
  57. for file in $(find . -name "*.md"); do
  58. markdown-link-check -c .dlc.json -q "$file"
  59. done