-
-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e11f1b
commit 637b2d9
Showing
1 changed file
with
0 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|