Переосмысливает статью про семантику #9385
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: PR Checks | |
on: | |
pull_request: | |
jobs: | |
editorconfig: | |
name: Форматирование | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- id: files | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: Ana06/[email protected] | |
- name: Работает линтер | |
run: | | |
npm install editorconfig-checker --global | |
config=.editorconfig | |
for changed_file in ${{ steps.files.outputs.added_modified }}; do | |
if [ $changed_file == $config ] | |
then | |
echo "Проверка для всех файлов" | |
editorconfig-checker | |
break | |
else | |
echo "Проверка для ${changed_file}" | |
editorconfig-checker ${changed_file} | |
fi | |
done | |
frontmatter-checker: | |
name: Мета | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- id: files | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: Ana06/[email protected] | |
with: | |
filter: | | |
(css|html|js|tools|a11y)/**/index.md | |
!(pages|people)/**/index.md | |
- name: Работает линтер | |
run: | | |
files='${{ steps.files.outputs.added_modified }}' | |
if ! [[ $files == "" ]]; then | |
echo "Проверка для файлов из PR" | |
npx yaml-cat --format json --output result.json $(echo $files | grep -o -E '(css|html|js|tools|a11y)/[a-z-]+/index.md') | |
node .github/scripts/frontmatter.js | |
else | |
echo "В PR нет файлов для проверки" | |
fi | |
link-checker: | |
name: Ссылки | |
needs: | |
- editorconfig | |
- frontmatter-checker | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: files | |
if: ${{ github.event_name == 'pull_request' }} | |
uses: Ana06/[email protected] | |
with: | |
filter: '*.md' | |
format: 'csv' | |
- name: Проверяет ссылки | |
if: ${{ steps.files.outputs.added_modified != '' }} | |
uses: JustinBeckwith/linkinator-action@v1 | |
with: | |
paths: ${{ steps.files.outputs.added_modified }} | |
markdown: true | |
serverRoot: "/home/runner/work/content/content" | |
linksToSkip: "https?://(localhost|codepen.io)?(:[0-9]+)?/.*" |