-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation: Create a github workflow to fetch docs from talawa mob…
…ile app (#867) * workflow added * workflow added1
- Loading branch information
1 parent
2dde847
commit 06a7464
Showing
2 changed files
with
54 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/bin/bash | ||
|
||
# Clone the Talawa repo | ||
git clone --depth=1 --branch develop https://github.com/PalisadoesFoundation/talawa.git | ||
|
||
# Create a folder for Talawa mobile docs | ||
mkdir -p docs/talawa-mobile-docs | ||
|
||
# Navigate into the Talawa repo | ||
cd talawa | ||
|
||
# Install Flutter dependencies and generate the docs | ||
flutter pub get | ||
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 | ||
|
||
# Navigate back and copy the generated docs | ||
cd .. | ||
cp -r talawa/talawa-mobile-docs/* docs/talawa-mobile-docs/ | ||
|
||
# Remove the cloned Talawa repo | ||
rm -rf talawa | ||
|
||
# Commit and push the changes | ||
git add . | ||
git commit -m "Updated Talawa mobile docs" | ||
git pull --rebase origin develop | ||
git push -u origin develop |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Pull Talawa Mobile Changes | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0' # Runs every Sunday at midnight | ||
workflow_dispatch: | ||
|
||
jobs: | ||
pull: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout current repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Git config | ||
run: | | ||
git config --global user.email "${{ env.email }}" | ||
git config --global user.name "${{ github.actor }}" | ||
- name: Run bash script to fetch Talawa mobile docs | ||
run: bash .github/workflows/pull-docs-talawa.sh | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |