Skip to content

redirect /community/forum/category to /community/forum/categories #3193

redirect /community/forum/category to /community/forum/categories

redirect /community/forum/category to /community/forum/categories #3193

Workflow file for this run

# Checks content for rules. Focused on new astro site
name: content_check
on:
pull_request:
# run once a day
schedule:
- cron: '13 19 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check_content:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
- name: Check for blog posts that have incorrect categories
run: |
find astro/src/content/blog/ -type f -name "*.md*" |grep -v swp | xargs grep '^categories:'|sed 's/.*categories: //'|sed 's/, /\n/g'|sort -u > out
RES=`diff out config/contentcheck/known-blog-categories.txt`
exit $RES
shell: bash
- name: Grep for absolute URLs referencing FusionAuth.io
continue-on-error: true
# we ignore 'open your browser and navigate to https://fusionauth.io/docs' because it is part of command output
# we ignore 'homepage "https://fusionauth.io"' because it is part of the homebrew formula
# we ignore "<a href='https://fusionauth.io/docs/v1/tech/tutorials/'>Learn how this app works.</a>" because it is part of a react tutorial
# we use continue-on-error because grep -v exits with code 1 if it doesn't find anything, but that's what we want.
run: |
find astro/src/content/ -type f -name "*.md*" | xargs grep 'https://fusionauth.io' | grep -v 'homepage "https://fusion' | grep -v 'open your browser and navigate to https://fusionauth.io/docs' |grep -v "<a href='https://fusionauth.io/docs/'>Learn how this app works.</a>" > absolute.out
shell: bash
- name: Check for absolute URLs referencing FusionAuth.io from file. Keep this next to 'Grep for absolute URLs referencing FusionAuth.io'
run: |
cat absolute.out
exit `cat absolute.out | wc -l | sed 's/[ ]*//g'`
shell: bash
- name: Check for old asciidoc styling syntax
run: |
exit `find astro/src/content/docs/ -type f | xargs grep ']#'| wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Check for old asciidoc code import
run: |
exit `find astro/src/content/docs/ -type f | xargs grep '++++'| wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Check for old doc nav url references
run: |
exit `find astro/src/content/ -type f | xargs grep 'docs/v1/tech'| wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Check for erroneous markdown references
run: |
exit `find astro/src/content/ -type f -name "*.md*" | xargs grep ']()'| wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Make sure all docs have a full sentence in their description.
run: |
exit `find astro/src/content/docs/ -type f -print|grep -v '/_' |xargs grep '^description: '|grep -v '\.$'|wc -l |sed 's/[ ]*//g'`
shell: bash
- name: Make sure docs don't use old asciidoc icon references
run: |
exit `find astro/src/content/docs/ -type f -print|xargs grep -l 'icon:[a-z]'| wc -l |sed 's/[ ]*//g'`
shell: bash
- name: check for APIFields with no name
run: |
echo `grep -R \<APIField astro/src/content/docs | grep -v name`
exit `find astro/src/content/docs/ -type f -print|xargs grep \<APIField | grep -v name | wc -l | sed 's/[ ]*//g'`
shell: bash
- name: check for the word 'edition' which we don't use any more, excluding files it is okay to have 'edition' in
run: |
echo `grep -Ri edition astro/src/content | grep -v 'IDEA'|grep -v 'Scouting'|grep -v '0-reactor-ed'|grep -v 'Gluu Server Community Edition'|grep -v 'TR/webauthn-2/'|grep -v 'API-Security/editions'|grep -v fusionauth-colorado-company-to-watch|grep -v 'edition.cnn.com'|grep -v 'hey are also called editions'|grep -v 'also known as an edition'`
exit `find astro/src/content -type f -print|xargs grep -i edition | grep -v 'IDEA'|grep -v 'Scouting'|grep -v '0-reactor-ed'|grep -v 'Gluu Server Community Edition'|grep -v 'TR/webauthn-2/'|grep -v 'API-Security/editions'|grep -v fusionauth-colorado-company-to-watch|grep -v 'edition.cnn.com'|grep -v 'hey are also called editions'|grep -v 'also known as an edition' | wc -l | sed 's/[ ]*//g'`
shell: bash
- name: check for the proper casing of word 'plan' which should always be lowercase when prefixed by Community, Starter, Enterprise or Essentials
run: |
# uncomment to troubleshoot or run locally. If this is uncommented and finds nothing (which is expected state) then it errors out and the GH workflow fails.
#find astro/src/content -type f|xargs egrep '(Enterprise|Community|Starter|Essentials) Plan' |grep -v '^##'
exit `find astro/src/content -type f|xargs egrep '(Enterprise|Community|Starter|Essentials) Plan'|grep -v '^##'|wc -l | sed 's/[ ]*//g'`
shell: bash
- name: check for the proper casing of plans, such as Community, Starter, Enterprise or Essentials
run: |
# uncomment to troubleshoot or run locally. If this is uncommented and finds nothing (which is expected state) then it errors out and the GH workflow fails.
#find astro/src/content -type f|xargs egrep '(enterprise|community|starter|essentials) plan'|grep -v '^##'
exit `find astro/src/content -type f|xargs egrep '(enterprise|community|starter|essentials) plan'|grep -v '^##' |wc -l | sed 's/[ ]*//g'`
shell: bash
- name: check for old style asciidoc URLs
run: |
echo `grep -R 'https://[^[]*\[' astro/src/content/docs |grep -v '(' | grep -v '[200]'`
exit `find astro/src/content/docs/ -type f -print|xargs grep 'https://[^[]*\[' astro/src/content/docs |grep -v '(' |grep -v '[200]' | wc -l | sed 's/[ ]*//g'`
# ignore the '[200]' because that is a valid case that grep picks up incorrectly
shell: bash
- name: check unsorted vale keywords. error to fix because this decreases merge conflicts
run: |
# first line shows output of unsorted item, second just an exit code. this needs to be LC_ALL=C because otherwise you run into issues between how macos sorts it and how linux/GH actions sorts it
echo `LC_ALL=C sort -cu config/vale/styles/config/vocabularies/FusionAuth/accept.txt`
exit `LC_ALL=C sort -Cu config/vale/styles/config/vocabularies/FusionAuth/accept.txt`
shell: bash