-
Notifications
You must be signed in to change notification settings - Fork 11
Add PR build test and markdown lint workflows #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
JohnRDOrazio
wants to merge
4
commits into
opensourcecatholic:master
from
JohnRDOrazio:add-pr-ci-checks
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b585321
Update CI workflow and add Dependabot config
JohnRDOrazio f9df23b
Align .ruby-version and Gemfile.lock with Ruby 3.4.9 bump
JohnRDOrazio 68db655
Add PR build test and markdown lint workflows
JohnRDOrazio 5d49247
Bump Node.js from 22 to 24 in PR markdown lint workflow
JohnRDOrazio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| commit-message: | ||
| prefix: ci | ||
| labels: | ||
| - dependencies | ||
| - github-actions | ||
|
|
||
| - package-ecosystem: bundler | ||
| directory: / | ||
| schedule: | ||
| interval: weekly | ||
| commit-message: | ||
| prefix: deps | ||
| labels: | ||
| - dependencies | ||
| - ruby |
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: PR build test | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '.ruby-version' | ||
| - 'Gemfile' | ||
| - 'Gemfile.lock' | ||
| - '_config.yml' | ||
| - '_data/**' | ||
| - '_includes/**' | ||
| - '_layouts/**' | ||
| - '_plugins/**' | ||
| - '.github/workflows/pr-build-test.yml' | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| container: ruby:3.4.9-bookworm | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
|
|
||
| - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | ||
| with: | ||
| path: vendor/bundle | ||
| key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock', '.ruby-version') }} | ||
|
|
||
| - name: Install Ruby dependencies. | ||
| run: | | ||
| gem install bundler | ||
| bundle install --path vendor/bundle | ||
|
|
||
| - name: Build static site with Jekyll. | ||
| run: bundle exec jekyll build |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: PR markdown lint | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - '**/*.md' | ||
| - '.markdownlint-cli2.yaml' | ||
| - '.github/workflows/pr-markdown-lint.yml' | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | ||
| with: | ||
| node-version: '24' | ||
|
|
||
| - name: Install markdownlint-cli2 | ||
| run: npm install -g markdownlint-cli2@0.22.1 | ||
|
|
||
| - name: Lint changed Markdown files | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| run: | | ||
| files=$(git diff --name-only --diff-filter=d "$BASE_SHA"...HEAD -- '*.md') | ||
| if [ -z "$files" ]; then | ||
| echo "No changed Markdown files to lint." | ||
| exit 0 | ||
| fi | ||
| echo "Linting:" | ||
| echo "$files" | ||
| echo "$files" | xargs -d '\n' -r markdownlint-cli2 | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Rules: https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md | ||
| config: | ||
| default: true | ||
| MD013: false # line-length — too disruptive for prose content | ||
| MD033: false # no-inline-html — Jekyll posts frequently embed raw HTML | ||
|
|
||
| ignores: | ||
| - 'vendor/**' | ||
| - '_site/**' | ||
| - 'node_modules/**' |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.2.2 | ||
| 3.4.9 |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine... Nitpicking, but if it were up to me I'd simplify:
Don't feel too strongly though, what's here will work 🤷♂️