github.heygears.com/openimsdk/tools@v0.0.49/.github/workflows/link-pr.yml (about)

     1  # Copyright © 2023 OpenIM open source community. All rights reserved.
     2  #
     3  # Licensed under the Apache License, Version 2.0 (the "License");
     4  # you may not use this file except in compliance with the License.
     5  # You may obtain a copy of the License at
     6  #
     7  #     http://www.apache.org/licenses/LICENSE-2.0
     8  #
     9  # Unless required by applicable law or agreed to in writing, software
    10  # distributed under the License is distributed on an "AS IS" BASIS,
    11  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  # See the License for the specific language governing permissions and
    13  # limitations under the License.
    14  
    15  name: Github Rebot for Link check error
    16  
    17  # Every Monday at 12:30 p.m
    18  on:
    19    schedule:
    20      - cron: '30 12 * * 1'
    21  
    22  jobs:
    23    linkChecker:
    24      runs-on: ubuntu-latest
    25      steps:
    26        - uses: actions/checkout@v4
    27  
    28        - name: Link Checker
    29          id: lychee
    30          uses: lycheeverse/lychee-action@v1.9.3
    31          with:
    32              # For parameter description, see https://github.com/lycheeverse/lychee#commandline-parameters
    33              # Actions Link address -> https://github.com/lycheeverse/lychee-action
    34              # -E, --exclude-all-private    Exclude all private IPs from checking.
    35              # -i, --insecure               Proceed for server connections considered insecure (invalid TLS)
    36              # -n, --no-progress            Do not show progress bar.
    37              # -t, --timeout <timeout>      Website timeout in seconds from connect to response finished [default:20]
    38              # --max-concurrency <max-concurrency>    Maximum number of concurrent network requests [default: 128]
    39              # -a --accept <accept>                      Comma-separated list of accepted status codes for valid links
    40              # docs/.vitepress/dist the site directory to check
    41              # ./*.md all markdown files in the root directory
    42            args: --verbose  -E -i --no-progress --exclude-path './CHANGELOG' './**/*.md'
    43          env:
    44            GITHUB_TOKEN: ${{secrets.BOT_GITHUB_TOKEN}}
    45  
    46        - name: Create Issue From File
    47          if: env.lychee_exit_code != 0
    48          uses: peter-evans/create-issue-from-file@v5
    49          with:
    50            title: Bug reports for links in OpenIM docs
    51            content-filepath: ./lychee/out.md
    52            labels: kind/documentation, triage/unresolved, report
    53            token: ${{ secrets.BOT_GITHUB_TOKEN }}