diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index f5ffef0..091af95 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -48,6 +48,8 @@ jobs: toggle_style_code: "${{ env.STYLE_CODE }}" toggle_url_check: "${{ env.URL_CHECKER }}" toggle_quiz_check: "${{ env.CHECK_QUIZZES }}" + toggle_md_linter: "${{ env.MARKDOWN_LINTER }}" + toggle_readability: "${{ env.READABILITY_REPORT }}" toggle_render_preview: "${{ env.RENDER_PREVIEW }}" rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}" @@ -60,8 +62,9 @@ jobs: with: check_type: spelling error_min: 3 - gh_pat: secrets.GH_PAT branch_name: ${GITHUB_HEAD_REF} + secrets: + gh_pat: ${{ secrets.GH_PAT }} url-check: name: Check URLs @@ -71,8 +74,9 @@ jobs: with: check_type: urls error_min: 0 - gh_pat: secrets.GH_PAT branch_name: ${GITHUB_HEAD_REF} + secrets: + gh_pat: ${{ secrets.GH_PAT }} quiz-check: name: Check quiz formatting @@ -82,8 +86,9 @@ jobs: with: check_type: quiz_format error_min: 0 - gh_pat: secrets.GH_PAT branch_name: ${GITHUB_HEAD_REF} + secrets: + gh_pat: ${{ secrets.GH_PAT }} ############################# Style the code ################################### style-code: @@ -110,6 +115,26 @@ jobs: git commit -m 'Style *mds' || echo "No changes to commit" git push origin || echo "No changes to commit" +############################# Readability Report ################################### + + readability-report: + name: Readability report + needs: yaml-check + runs-on: ubuntu-latest + if: ${{needs.yaml-check.outputs.toggle_readability == 'yes'}} + + steps: + - name: Checkout repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Readability report + uses: Rebilly/lexi@v2 + with: + github-token: ${{ secrets.GH_PAT }} + glob: '**/*.md' + ############################# Render Preview ################################### render-preview: diff --git a/config_automation.yml b/config_automation.yml index 460f418..bcbe613 100644 --- a/config_automation.yml +++ b/config_automation.yml @@ -10,6 +10,10 @@ render-preview: yes spell-check: yes # Style any R code style-code: yes +# Would you like your markdown files to be checked for formatting +markdown-linter: yes +# Would you like a readability report on your markdowns? +readability-report: yes # Test build the docker image if any docker-relevant files have been changed docker-test: no # Should URLs be tested periodically?