Skip to content

Commit

Permalink
update pull-request.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hars-21 committed Jan 22, 2025
1 parent a356df9 commit c0bf4a5
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ jobs:
echo "Error: Close this PR and try again."
exit 1
generate-docs:
name: Update documentation
Update-Documentation:
if: github.ref == 'refs/heads/automated-docs'
name: Update Documentation
runs-on: ubuntu-latest
environment: TALAWA_ENVIRONMENT
steps:
Expand All @@ -117,9 +118,9 @@ jobs:
flutter analyze
dart analyze
flutter pub global activate dartdoc
flutter pub global run dartdoc . --output docs/docs/auto-docs --exclude=test/widget_tests/widgets/pinned_carousel_widget_test.dart, lib/widgets/pinned_carousel_widget.dart, lib/widgets/post_widget.dart, test/widget_tests/widgets/post_widget_test.dart
rm -rf talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/build.md
rm -rf talawa-mobile-docs/widgets_post_widget/PostContainerState/build.md
flutter pub global run dartdoc . --output docs/docs/auto-docs --format md --exclude=test/widget_tests/widgets/pinned_carousel_widget_test.dart, lib/widgets/pinned_carousel_widget.dart, lib/widgets/post_widget.dart, test/widget_tests/widgets/post_widget_test.dart
rm -rf docs/docs/auto-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/build.md
rm -rf docs/docs/auto-docs/widgets_post_widget/PostContainerState/build.md
- uses: actions/upload-artifact@v3
with:
name: docs
Expand Down Expand Up @@ -157,6 +158,24 @@ jobs:
git push
echo -e "🚀${Green} Hurrah! doc updated${NoColor}"
Documentation-to-talawa-docs:
if: github.ref == 'refs/heads/develop-postgres' && ${{ github.actor != 'dependabot[bot]' }}
name: Export Documentation to Auto-Docs
runs-on: ubuntu-latest
needs: Update-Documentation
steps:
- uses: actions/checkout@v4
- uses: dmnemec/[email protected]
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB_NEW }}
with:
source_file: "talawa-mobile-docs/"
destination_repo: "PalisadoesFoundation/talawa"
destination_folder: "docs/docs/auto-docs"
user_email: "${{env.email}}"
user_name: "${{github.actor}}"
commit_message: "Writing talawa-mobile-docs to auto-docs"

Branch-check:
if: ${{ github.actor != 'dependabot[bot]' && !contains(github.event.pull_request.labels.*.name, 'ignore-sensitive-files-pr') }}
name: "Base branch check"
Expand Down

0 comments on commit c0bf4a5

Please sign in to comment.