Skip to content

Commit

Permalink
Add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ulusoyca committed Dec 20, 2024
1 parent d45044f commit 1b00908
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/widgetbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Widgetbook Cloud Hosting
on: push

jobs:
widgetbook-cloud-hosting:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup flutter
uses: subosito/flutter-action@v2
with:
channel: stable

- name: Bootstrap App
run: |
flutter pub get
# Add any other steps needed to make your
# app widgets available for Widgetbook
- name: Build Widgetbook
working-directory: widgetbook
run: |
flutter pub get
dart run build_runner build -d
flutter build web -t examples/coffee_maker_navigator_2/widgetbook/lib/main.dart
- name: Install Widgetbook CLI
run: dart pub global activate widgetbook_cli

- name: Push Widgetbook Build
working-directory: widgetbook
run: widgetbook cloud build push --api-key ${{ secrets.WIDGETBOOK_API_KEY }}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ Widget addWaterScreenContent(BuildContext context) {
context.knobs.string(
label: 'Error Message',
initialValue: 'Error message',
description: 'The error message to display',
maxLines: 1
),
),
onWaterQuantityUpdated: (_) {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Widget extraRecommendationTile(BuildContext context) {
label: 'Extra recommendation',
options: ExtraRecommendation.values,
initialOption: ExtraRecommendation.baklava,
labelBuilder: (value) => value.label,
labelBuilder: (value) => 'kslaklsa ${value.label}',
),
isSelected: context.knobs.boolean(
label: 'Is selected',
Expand Down

0 comments on commit 1b00908

Please sign in to comment.