Updating condition on which the check-404-links is run #75
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Markdown checks | |
on: | |
push: | |
pull_request: | |
jobs: | |
# Only on main or PR to main | |
check-404-links: | |
name: Check for dead links | |
if: github.ref == 'refs/heads/main' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'main') | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: 404 Links | |
uses: atalent-labs/404-links@3.1.4 | |
markdownlint: | |
name: Markdownlint | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v2 | |
- name: Lint all MD files | |
uses: docker://avtodev/markdown-lint:v1 # fastest way | |
with: | |
args: '.' |