From bb6f79285c0d2ab3e5652a5b4670c5143d21a348 Mon Sep 17 00:00:00 2001 From: Divyanshu gautam Date: Tue, 15 Oct 2024 21:52:52 +0530 Subject: [PATCH] code cleanup done (#2590) --- .github/workflows/push.yml | 84 -------------------------------------- 1 file changed, 84 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index b5f9e68d8..a48b221fa 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -73,90 +73,6 @@ jobs: # - name: Echo the GitHub context for troubleshooting # run: echo "${{ toJSON(github) }}" - Update-Documentation: - if: github.ref == 'refs/heads/automated-docs' - name: Update Documentation - runs-on: ubuntu-latest - environment: TALAWA_ENVIRONMENT - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - distribution: 'zulu' # See 'Supported distributions' for available options - java-version: '12.0' - - uses: subosito/flutter-action@v2 - with: - flutter-version: '3.22.3' - channel: 'stable' - - uses: dart-lang/setup-dart@v1 - with: - sdk: '3.4.4' - - run: | - cd talawa_lint && flutter pub get && cd .. - flutter pub get - flutter analyze - dart analyze - flutter pub global activate dartdoc - flutter pub global run dartdoc . --output talawa-mobile-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 talawa-mobile-docs/widgets_pinned_carousel_widget/CustomCarouselScrollerState/build.md - rm -rf talawa-mobile-docs/widgets_post_widget/PostContainerState/build.md - - uses: actions/upload-artifact@v1 - with: - name: talawa-mobile-docs - path: talawa-mobile-docs - - name: Checking doc updated - id: DocUpdated - run: | - if [ -n "$(git status --porcelain)" ]; then - echo "updateDoc=true" >> $GITHUB_OUTPUT - echo -e "Documentation has been updated!!" - else - Green='0;32' - NoColor='\033[0m' - echo -e "${Green}No documentation updated${NoColor}" - fi - - name: Set env variables - if: steps.DocUpdated.outputs.updateDoc - run: | - echo "commit_id=$(echo $(git rev-parse HEAD))" >> $GITHUB_ENV - echo "email=$(echo $(git log --pretty=format:"%ae" $commit_id))" >> $GITHUB_ENV - - name: Handle untracked files - if: steps.DocUpdated.outputs.updateDoc - run: | - git config --global user.name "${{github.actor}}" - git config --global user.email "${{env.email}}" - git add . - - name: Update Doc - if: steps.DocUpdated.outputs.updateDoc - run: | - Green='0;32' - NoColor='\033[0m' - git config --global user.name "${{github.actor}}" - git config --global user.email "${{env.email}}" - git commit -a -m "Updated docs" - git push - echo -e "🚀${Green} Hurrah! doc updated${NoColor}" - - Documentation-to-talawa-docs: - if: github.ref == 'refs/heads/automated-docs' && ${{ github.actor != 'dependabot[bot]' }} - name: Export Documentation to Talawa-Docs - runs-on: ubuntu-latest - needs: Update-Documentation - steps: - - uses: actions/checkout@v4 - - uses: dmnemec/copy_file_to_another_repo_action@v1.1.1 - env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB_NEW }} - with: - source_file: 'talawa-mobile-docs/' - destination_repo: 'PalisadoesFoundation/talawa-docs' - destination_branch: 'develop' - destination_folder: 'docs' - user_email: '${{env.email}}' - user_name: '${{github.actor}}' - commit_message: 'Overwriting talawa-mobile-docs from talawa-repo' - - Flutter-Testing: if: ${{ github.actor != 'dependabot[bot]' }}