Skip to content

merge from zebrafed #238

merge from zebrafed

merge from zebrafed #238

Workflow file for this run

name: CI - Pull Request
on:
pull_request:
jobs:
up-to-date:
uses: ./.github/workflows/up-to-date.yml
code-quality:
uses: ./.github/workflows/code-quality.yml
check-secret:
runs-on: ubuntu-latest
outputs:
secret-exists: ${{ steps.check.outputs.defined }}
steps:
- name: Check PR can access secrets
id: check
run: |
if [ "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZETA_DS }}" != '' ]; then
echo "defined=true" >> $GITHUB_OUTPUT;
else
echo "defined=false" >> $GITHUB_OUTPUT;
fi
deploy-preview:
name: Deploy preview version of the storybook on firebase
needs: [up-to-date, code-quality, check-secret]
if: needs.check-secret.outputs.secret-exists == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- uses: subosito/flutter-action@v2
- name: Setup flutter
run: flutter pub get
- name: Build example app
run: |
cd example
flutter build web -t widgetbook/main.dart -o ../build --no-tree-shake-icons
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ env.key }}"
channelId: "pr-${{ github.event.number }}-${{ github.event.pull_request.head.ref }}"