From bc3da2e48053ca487a6c629414808eb0a365d69b Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Thu, 21 Dec 2023 19:19:10 -0500 Subject: [PATCH 1/4] chore: Split Docs CI from core CI --- .github/workflows/ci.yml | 19 +++----------- .github/workflows/docs-ci.yml | 47 +++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/docs-ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9798d7c7eb6..0f0ebc20438 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 - - 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 test_on_node: name: Test diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml new file mode 100644 index 00000000000..af34ef58447 --- /dev/null +++ b/.github/workflows/docs-ci.yml @@ -0,0 +1,47 @@ +name: CI +on: + push: + branches: [main] + paths: + - 'docs/**' + + pull_request: + branches: [main] + +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 + + - 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 From 751ceecad3eb402fbbeb088bab2708945bd68ce2 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Thu, 4 Jan 2024 15:09:32 -0500 Subject: [PATCH 2/4] Rearrange tasks between ci and docs-ci --- .github/workflows/ci.yml | 11 +++++++++++ .github/workflows/docs-ci.yml | 10 ---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f0ebc20438..0b51960fea7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,17 @@ jobs: - name: Check Licenses run: node Makefile checkLicenses + - 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 + + test_on_node: name: Test strategy: diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index af34ef58447..6395eb7811f 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -28,16 +28,6 @@ jobs: 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 From a00ebb7aaa216b2175b0fed78d24fc7d9b71d7ca Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Fri, 5 Jan 2024 13:09:13 -0500 Subject: [PATCH 3/4] Incorporate feedback --- .github/workflows/ci.yml | 8 ++++---- .github/workflows/docs-ci.yml | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b51960fea7..18d63f49dae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,10 @@ jobs: - name: Install Packages run: npm install + - name: Install Docs Packages + working-directory: docs + run: npm install + - name: Lint Files run: node Makefile lint @@ -29,10 +33,6 @@ jobs: - name: Check Licenses run: node Makefile checkLicenses - - name: Stylelint Docs - working-directory: docs - run: npm run lint:scss - - name: Lint Docs JS Files run: node Makefile lintDocsJS diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 6395eb7811f..2606555803d 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -21,13 +21,14 @@ jobs: with: node-version: 'lts/*' - - name: Install Root Packages - run: npm install - - name: Install Docs Packages working-directory: docs run: npm install + - name: Stylelint Docs + working-directory: docs + run: npm run lint:scss + - name: Build Docs Website working-directory: docs run: npm run build From a924b50a8611375936936b432b839def52bf4b78 Mon Sep 17 00:00:00 2001 From: "Nicholas C. Zakas" Date: Tue, 9 Jan 2024 17:38:59 -0500 Subject: [PATCH 4/4] Add paths to pull_request event --- .github/workflows/docs-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs-ci.yml b/.github/workflows/docs-ci.yml index 2606555803d..0e780de7cc2 100644 --- a/.github/workflows/docs-ci.yml +++ b/.github/workflows/docs-ci.yml @@ -7,6 +7,8 @@ on: pull_request: branches: [main] + paths: + - 'docs/**' permissions: contents: read