Skip to content

Commit

Permalink
refactor: github-workflow to autogenerate docs from codebase's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bint-Eve committed Jan 2, 2025
1 parent 9d5a993 commit 43c380b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ jobs:
# Create auto-docs directory if it doesn't exist
mkdir -p docs/docs/auto-docs
# Generate documentation using TypeDoc
typedoc \
if ! typedoc \
--out docs/docs/auto-docs \
--plugin typedoc-plugin-markdown \
--tsconfig tsconfig.json \
Expand All @@ -465,11 +465,17 @@ jobs:
--exclude "**/*.test.tsx" \
--exclude "**/*.spec.ts" \
--exclude "**/*.spec.tsx"
echo "Documentation generation failed"
exit 1
fi
- name: Setup Git Config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
if ! git config user.name "GitHub Actions Bot" || \
! git config user.email "41898282+github-actions[bot]@users.noreply.github.com"; then
echo "Failed to configure Git"
exit 1
fi
- name: Commit changes
run: |
Expand All @@ -479,12 +485,14 @@ jobs:
if git diff --staged --quiet; then
echo "No changes to commit"
else
echo "Committing changes to documentation"
git commit -m "chore(docs): update auto-generated API documentation [skip ci]"
# Push to the feature branch
git push origin feature/admin-docs-refactor || {
echo "Failed to push changes"
exit 1
}
git push origin "${{ github.head_ref }}" || {
echo "Failed to push changes"
exit 1
}
fi
Validate-Coderabbit:
Expand Down

0 comments on commit 43c380b

Please sign in to comment.