From 0e3ca6bf3027eb8c2e3d6e37c2dccc83fbc50670 Mon Sep 17 00:00:00 2001 From: Shaun Verch Date: Wed, 12 Jan 2022 13:01:52 -0500 Subject: [PATCH] Run markdown link checker only on markdown changes (#1117) * Run markdown link checker only on markdown changes This makes sure that this action only runs if the pull request is on the main branch and is changing markdown files. Fixes: https://github.com/usds/justice40-tool/issues/1114 * Remove push to main trigger * Ignore eeoc.gov in link checker Sometimes it seems down from the perspective of github actions. --- .github/workflows/markdown-link-check.yml | 7 ++++++- mlc_config.json | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/markdown-link-check.yml b/.github/workflows/markdown-link-check.yml index 3a2f64d0..780dd59c 100644 --- a/.github/workflows/markdown-link-check.yml +++ b/.github/workflows/markdown-link-check.yml @@ -1,7 +1,12 @@ name: Check Markdown links on: - push: pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + # Run only if the pull request changes a markdown file: + # https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpaths + paths: + - '**.md' jobs: markdown-link-check: runs-on: ubuntu-latest diff --git a/mlc_config.json b/mlc_config.json index 53f78d89..09a538ae 100644 --- a/mlc_config.json +++ b/mlc_config.json @@ -17,6 +17,9 @@ }, { "pattern": "^https://.*medium.com" + }, + { + "pattern": "^https://www.eeoc.gov" } ], "replacementPatterns": [