Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code cleanup done #2590

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 0 additions & 85 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,91 +73,6 @@ jobs:
# - name: Echo the GitHub context for troubleshooting
# run: echo "${{ toJSON(github) }}"

Update-Documentation:
if: github.ref == 'refs/heads/automated-docs' && ${{ github.actor != 'dependabot[bot]' }}
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]' }}
name: Testing codebase
Expand Down
Loading