1
0
mirror of synced 2025-12-19 09:57:42 -05:00
Files
docs/.github/workflows/lint-entire-content-data-markdown.yml
dependabot[bot] 3e333183fb Bump actions/checkout from 5.0.0 to 6.0.1 (#58937)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-16 23:37:47 +00:00

51 lines
1.8 KiB
YAML

name: 'Lint entire content and data markdown files'
# **What it does**: Lints our content markdown weekly to ensure the content matches the specified styleguide. If errors or warnings exist, it opens an issue for the Docs content team to review.
# **Why we have it**: Extra precaution to run linter on the entire content/data directories.
# **Who does it impact**: Docs content.
on:
workflow_dispatch:
schedule:
- cron: '20 16 * * 0' # Run every day at 16:20 UTC / 8:20 PST every Sunday
permissions:
contents: read
issues: write
jobs:
lint-entire-content-data:
name: Lint entire content and data directories
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- name: Check that gh CLI is installed
run: gh --version
- name: Check out repo's default branch
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Node and dependencies
uses: ./.github/actions/node-npm-setup
- name: Run content linter
id: linting-content-data
timeout-minutes: 10
continue-on-error: true
run: npm run lint-content -- --paths content data --output-file /tmp/lint-results.json
- name: Open issue in docs-content
if: ${{ always() && steps.linting-content-data.outcome == 'failure' }}
env:
GITHUB_TOKEN: ${{ secrets.DOCS_BOT_PAT_BASE }}
REPORT_AUTHOR: docs-bot
REPORT_LABEL: broken content markdown report
REPORT_REPOSITORY: github/docs-content
run: npm run lint-report -- --path /tmp/lint-results.json
- uses: ./.github/actions/slack-alert
if: ${{ failure() && github.event_name != 'workflow_dispatch' }}
with:
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }}
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }}