From 58755a6c887ee55942e2c41eaa000a9fa7f5ad18 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Sat, 27 Jul 2024 15:47:48 -0400 Subject: [PATCH] docs: Check formatting in CI (#15355) This PR adds a CI step to ensure the docs are properly formatted. Release Notes: - N/A --- .github/workflows/danger.yml | 2 +- .github/workflows/docs.yml | 24 ++++++++++++++++++++++++ docs/.prettierignore | 2 ++ docs/theme/fonts/fonts.css | 16 ++++++++-------- 4 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 docs/.prettierignore diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 2221f2ee4d..b68c3ff5a0 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 - - uses: pnpm/action-setup@v3 + - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3 with: version: 9 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000000..d5ef10623d --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,24 @@ +name: Docs + +on: + pull_request: + paths: + - "docs/**" + push: + branches: + - main + +jobs: + check_formatting: + name: "Check formatting" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + + - uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3 + with: + version: 9 + + - run: pnpm dlx prettier . --check + working-directory: ./docs diff --git a/docs/.prettierignore b/docs/.prettierignore new file mode 100644 index 0000000000..a52439689a --- /dev/null +++ b/docs/.prettierignore @@ -0,0 +1,2 @@ +# Handlebars partials are not supported by Prettier. +*.hbs diff --git a/docs/theme/fonts/fonts.css b/docs/theme/fonts/fonts.css index 2393b38abd..39946604ab 100644 --- a/docs/theme/fonts/fonts.css +++ b/docs/theme/fonts/fonts.css @@ -3,15 +3,15 @@ /* open-sans-300 - latin_vietnamese_latin-ext_greek-ext_greek_cyrillic-ext_cyrillic */ @font-face { - font-family: "Agrandir"; - font-style: normal; - font-weight: 400; - src: url("PPAgrandir-Regular.woff2") format("woff2"); + font-family: "Agrandir"; + font-style: normal; + font-weight: 400; + src: url("PPAgrandir-Regular.woff2") format("woff2"); } @font-face { - font-family: "IA Writer Quattro S"; - font-style: normal; - font-weight: 400; - src: url("iAWriterQuattroS-Regular.woff2") format("woff2"); + font-family: "IA Writer Quattro S"; + font-style: normal; + font-weight: 400; + src: url("iAWriterQuattroS-Regular.woff2") format("woff2"); }