diff --git a/.github/workflows/doc_test.yml b/.github/workflows/doc_test.yml new file mode 100644 index 00000000..fe9b450e --- /dev/null +++ b/.github/workflows/doc_test.yml @@ -0,0 +1,32 @@ +name: Documentation Check + +on: + pull_request: + branches: + - main + +jobs: + check-docs: + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y coreutils + + - name: Run documentation script + run: | + chmod +x ./scripts/docgen.sh + ./scripts/docgen.sh + + - name: Check for changes + run: | + if [[ `git status --porcelain` ]]; then + echo "Documentation is not up to date. Please update before merging." + exit 1 # Fail the job to indicate documentation is not up-to-date + else + echo "Documentation is up-to-date." + fi