Skip to content

corrected js express link #1044

corrected js express link

corrected js express link #1044

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@v3
- 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 .github/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 "<a href='https://fusionauth.io/docs/v1/tech/tutorials/'>Learn how this app works.</a>" |grep -v 'homepage "https://fusionauth.io"' | grep -v 'open your browser and navigate to https://fusionauth.io/docs' > 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: |
exit `cat absolute.out | 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: Check for titles/headers that have incorrect casing
#run: |
#! find astro/src/content/ -type f -name "*.md*" |grep -v swp | xargs grep title: |grep -v subtitle|sed 's/.*title: //' | sed "s/'//g" | grep -E '\b[a-z]+\b'
#shell: bash