Skip to content

Commit

Permalink
code cleanup done (#2590)
Browse files Browse the repository at this point in the history
  • Loading branch information
gautam-divyanshu authored Oct 15, 2024
1 parent 5c8a4b6 commit bb6f792
Showing 1 changed file with 0 additions and 84 deletions.
84 changes: 0 additions & 84 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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]' }}
Expand Down

0 comments on commit bb6f792

Please sign in to comment.