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
Rukhsarkh committed Jan 1, 2025
1 parent ed23e85 commit 861757b
Show file tree
Hide file tree
Showing 17 changed files with 75 additions and 545 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -466,3 +466,54 @@ jobs:
run: |
echo "Error: Pull request target branch must be 'develop-postgres'. Please refer PR_GUIDELINES.md"
exit 1
generate-docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: feature/admin-docs-refactor # Explicitly checkout your feature branch

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'

- name: Generate Documentation
run: |
# Install required dependencies
npm install -g typedoc
# Create auto-docs directory if it doesn't exist
mkdir -p docs/docs/auto-docs
# Generate documentation using TypeDoc
typedoc \
--out docs/docs/auto-docs \
--plugin typedoc-plugin-markdown \
--entryPoints "src/**/*.ts" \
--entryPoints "src/**/*.tsx" \
--exclude "**/*.test.ts" \
--exclude "**/*.test.tsx" \
--exclude "**/*.spec.ts" \
--exclude "**/*.spec.tsx"
- name: Setup Git Config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Commit changes
run: |
# Stage the auto-generated docs
git add docs/docs/auto-docs
# Only commit if there are changes
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "chore: update auto-generated documentation"
# Push to the feature branch
git push origin feature/admin-docs-refactor
fi
47 changes: 0 additions & 47 deletions docs/docs/intro.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/docs/manual/developer-guide/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Introduction

<h1> Developer Guide </h1>
Welcome to the Talawa Admin Developer Guide. This guide will help you understand how to develop with Talawa Admin.

This section contains automatically generated documentation from our source code.

The documentation below is automatically generated from code comments in the source files.
8 changes: 8 additions & 0 deletions docs/docs/manual/developer-guide/reference/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Introduction

<h1> Developer Guide Developer-Guide/reference</h1>
Welcome to the Talawa Admin Developer Guide. This guide will help you understand how to develop with Talawa Admin.

This section contains automatically generated documentation from our source code.

The documentation below is automatically generated from code comments in the source files.
8 changes: 8 additions & 0 deletions docs/docs/manual/user-guide/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Introduction

<h1>User Guide</h1>
Welcome to the Talawa Admin User Guide. This guide will help you understand how to use the admin interface effectively.

This section contains automatically generated documentation from our source code.

The documentation below is automatically generated from code comments in the source files.
8 changes: 0 additions & 8 deletions docs/docs/tutorial-basics/_category_.json

This file was deleted.

23 changes: 0 additions & 23 deletions docs/docs/tutorial-basics/congratulations.md

This file was deleted.

34 changes: 0 additions & 34 deletions docs/docs/tutorial-basics/create-a-blog-post.md

This file was deleted.

57 changes: 0 additions & 57 deletions docs/docs/tutorial-basics/create-a-document.md

This file was deleted.

43 changes: 0 additions & 43 deletions docs/docs/tutorial-basics/create-a-page.md

This file was deleted.

31 changes: 0 additions & 31 deletions docs/docs/tutorial-basics/deploy-your-site.md

This file was deleted.

Loading

0 comments on commit 861757b

Please sign in to comment.