From 41bb5f5c534a4ebc645928c58788b4f1f9f68104 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Thu, 30 Oct 2025 12:50:08 -0400 Subject: [PATCH 1/2] add markup check and test edit --- .github/workflows/markup-pr.yml | 34 +++++++++++++++++++ .../pages/customization/user-feedback.mdx | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/markup-pr.yml diff --git a/.github/workflows/markup-pr.yml b/.github/workflows/markup-pr.yml new file mode 100644 index 000000000..cd483cb3d --- /dev/null +++ b/.github/workflows/markup-pr.yml @@ -0,0 +1,34 @@ +permissions: + contents: read + pull-requests: write + statuses: write + +name: PR Quality Check +on: + pull_request: + paths: + - '**.mdx' + - '**.md' + - '.vale/**' + - '.vale.ini' + - '!**/changelog/**' +jobs: + quality-gate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Quality Analysis + id: analysis + uses: markupai/content-guardian-action@v1 + with: + markup_ai_api_key: ${{ secrets.MARKUP_AI_API_KEY }} + github_token: ${{ secrets.GITHUB_TOKEN }} + dialect: "american_english" + style-guide: "microsoft" + # tone is optional + tone: "technical" + + - name: Check Quality Score + run: | + results='${{ steps.analysis.outputs.results }}' + # Add your quality threshold logic here \ No newline at end of file diff --git a/fern/products/docs/pages/customization/user-feedback.mdx b/fern/products/docs/pages/customization/user-feedback.mdx index 4651dd5ba..6cdfdff5a 100644 --- a/fern/products/docs/pages/customization/user-feedback.mdx +++ b/fern/products/docs/pages/customization/user-feedback.mdx @@ -3,7 +3,7 @@ title: Collecting feedback and suggestions from users slug: user-feedback --- -Fern offers a variety of ways to track feedback and suggested improvements from users. +Fern offers a variety of ways to track feedback and suggested improvements from users. test edit ## On-page feedback By default, every Markdown page of your docs contains a feedback component at the bottom of the page: From 1c82679286a57ea6db47b760e4a31ec0ae4564a2 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Thu, 30 Oct 2025 13:07:05 -0400 Subject: [PATCH 2/2] mdx workaround --- .github/workflows/markup-pr.yml | 25 +++++++++++++++++-- .../pages/customization/user-feedback.mdx | 2 +- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/workflows/markup-pr.yml b/.github/workflows/markup-pr.yml index cd483cb3d..5969c269c 100644 --- a/.github/workflows/markup-pr.yml +++ b/.github/workflows/markup-pr.yml @@ -17,6 +17,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 + + # Temporarily rename .mdx to .md + - name: Prepare MDX files + run: | + # Store original names + find . -name "*.mdx" > /tmp/mdx_files.txt + # Rename to .md + while read file; do + mv "$file" "${file%.mdx}.md" + done < /tmp/mdx_files.txt + - name: Quality Analysis id: analysis uses: markupai/content-guardian-action@v1 @@ -25,10 +36,20 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} dialect: "american_english" style-guide: "microsoft" - # tone is optional tone: "technical" + + # Rename back to .mdx + - name: Restore MDX extensions + if: always() + run: | + while read file; do + md_file="${file%.mdx}.md" + if [ -f "$md_file" ]; then + mv "$md_file" "$file" + fi + done < /tmp/mdx_files.txt - name: Check Quality Score run: | results='${{ steps.analysis.outputs.results }}' - # Add your quality threshold logic here \ No newline at end of file + echo "$results" \ No newline at end of file diff --git a/fern/products/docs/pages/customization/user-feedback.mdx b/fern/products/docs/pages/customization/user-feedback.mdx index 6cdfdff5a..4aa62ce1b 100644 --- a/fern/products/docs/pages/customization/user-feedback.mdx +++ b/fern/products/docs/pages/customization/user-feedback.mdx @@ -3,7 +3,7 @@ title: Collecting feedback and suggestions from users slug: user-feedback --- -Fern offers a variety of ways to track feedback and suggested improvements from users. test edit +Fern offers a variety of ways to track feedback and suggested improvements from users. test edit testing ## On-page feedback By default, every Markdown page of your docs contains a feedback component at the bottom of the page: