diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml new file mode 100644 index 000000000..882e08cce --- /dev/null +++ b/.github/workflows/links.yml @@ -0,0 +1,31 @@ +name: Links + +on: + repository_dispatch: + workflow_dispatch: + pull_request: + schedule: + - cron: "00 18 * * *" + +jobs: + check-links: + runs-on: ubuntu-latest + permissions: + issues: write # required for peter-evans/create-issue-from-file + steps: + - uses: actions/checkout@v5 + + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v2 + with: + args: . --exclude-path "tests" + fail: false + + # - name: Create Issue From File + # if: steps.lychee.outputs.exit_code != 0 && github.event_name == 'schedule' + # uses: peter-evans/create-issue-from-file@v5 + # with: + # title: Link Checker Report + # content-filepath: ./lychee/out.md + # labels: 'type: documentation' diff --git a/docs/README.md b/docs/README.md index fa3fab223..5c307dc6b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,4 +1,5 @@ [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/commitizen-tools/commitizen/pythonpackage.yml?label=python%20package&logo=github&logoColor=white&style=flat-square)](https://github.com/commitizen-tools/commitizen/actions) +[![Check Links](https://github.com/commitizen-tools/commitizen/actions/workflows/links.yml/badge.svg)](https://github.com/commitizen-tools/commitizen/actions/workflows/links.yml) [![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg?style=flat-square)](https://conventionalcommits.org) [![PyPI Package latest release](https://img.shields.io/pypi/v/commitizen.svg?style=flat-square)](https://pypi.org/project/commitizen/) [![PyPI Package download count (per month)](https://img.shields.io/pypi/dm/commitizen?style=flat-square)](https://pypi.org/project/commitizen/)