mirror of
https://github.com/coder/coder.git
synced 2026-06-04 05:28:20 +00:00
f8844cab0a
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Muhammad Atif Ali <atif@coder.com>
46 lines
1.1 KiB
YAML
46 lines
1.1 KiB
YAML
name: Docs CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "docs/**"
|
|
- "**.md"
|
|
- ".github/workflows/docs-ci.yaml"
|
|
|
|
pull_request:
|
|
paths:
|
|
- "docs/**"
|
|
- "**.md"
|
|
- ".github/workflows/docs-ci.yaml"
|
|
|
|
jobs:
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
|
|
|
- name: Setup Node
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- uses: tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
|
|
id: changed-files
|
|
with:
|
|
files: |
|
|
docs/**
|
|
**.md
|
|
separator: ","
|
|
|
|
- name: lint
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
run: |
|
|
pnpm exec markdownlint-cli2 ${{ steps.changed-files.outputs.all_changed_files }}
|
|
|
|
- name: fmt
|
|
if: steps.changed-files.outputs.any_changed == 'true'
|
|
run: |
|
|
# markdown-table-formatter requires a space separated list of files
|
|
echo ${{ steps.changed-files.outputs.all_changed_files }} | tr ',' '\n' | pnpm exec markdown-table-formatter --check
|