Skip to content
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

chore: Split Docs CI from core CI #17897

Merged
merged 5 commits into from Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 3 additions & 16 deletions .github/workflows/ci.yml
Expand Up @@ -19,28 +19,15 @@ jobs:
node-version: 'lts/*'
- name: Install Packages
run: npm install

- name: Lint Files
run: node Makefile lint

- name: Check Rule Files
run: node Makefile checkRuleFiles

- name: Check Licenses
run: node Makefile checkLicenses
- name: Install Docs Packages
working-directory: docs
run: npm install
nzakas marked this conversation as resolved.
Show resolved Hide resolved
- name: Stylelint Docs
working-directory: docs
run: npm run lint:scss
- name: Lint Docs JS Files
run: node Makefile lintDocsJS
- name: Check Rule Examples
run: node Makefile checkRuleExamples
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about these two. A change in our eslint config or in the tool that checks rule examples can cause these checks to fail. But those changes are not in docs/** so they wouldn't trigger these checks and so the failures might go unnoticed until someone submits a PR that changes something in the docs.

Maybe only those tasks that run in working-directory: docs can be safely extracted into a separate CI?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. 👍

- name: Build Docs Website
working-directory: docs
run: npm run build
- name: Validate internal links
working-directory: docs
run: npm run lint:links

test_on_node:
name: Test
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/docs-ci.yml
@@ -0,0 +1,47 @@
name: CI
on:
push:
branches: [main]
paths:
- 'docs/**'

pull_request:
branches: [main]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we also add the same paths for pull_request?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh good catch!

permissions:
contents: read

jobs:
verify_files:
name: Verify Docs Files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Install Root Packages
run: npm install
nzakas marked this conversation as resolved.
Show resolved Hide resolved

- name: Install Docs Packages
working-directory: docs
run: npm install

- name: Stylelint Docs
working-directory: docs
run: npm run lint:scss

- name: Lint Docs JS Files
run: node Makefile lintDocsJS

- name: Check Rule Examples
run: node Makefile checkRuleExamples

- name: Build Docs Website
working-directory: docs
run: npm run build

- name: Validate internal links
working-directory: docs
run: npm run lint:links