From d9fc30fbfd34981f1faed394d530a13bee30b821 Mon Sep 17 00:00:00 2001 From: Felix Fontein Date: Sat, 16 Sep 2023 11:26:34 +0200 Subject: [PATCH] Add workflow for rstcheck and mdl. Signed-off-by: Felix Fontein --- .github/workflows/docs.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..14f11280e9 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,38 @@ +name: "Docs" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + # Only consider changes to documentation + paths: + - '**/*.md' + - '**/*.rst' + - '**/*.txt' + schedule: + - cron: '25 6 * * 3' + +permissions: + contents: read + +jobs: + documentation: + name: Lint RST and MD files + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + + - name: Install rstcheck + run: pip install rstcheck + + - name: Run rstcheck on all RST files + run: rstcheck $(find -name '*.rst') + + - name: Install markdownlint + run: sudo gem install mdl + + - name: Run mdl on all MD files + run: mdl $(find -name '*.md')