ca333 is deploying a preview build to Firebase Hosting π #1733
This file contains hidden or 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
| # Deploys a preview build to Firebase Hosting when a pull request is opened, synchronized, or reopened | |
| name: Deploy to Firebase Hosting on PR | |
| run-name: ${{ github.actor }} is deploying a preview build to Firebase Hosting π | |
| on: | |
| pull_request: | |
| branches: | |
| - dev | |
| - main | |
| - release/* | |
| workflow_dispatch: | |
| jobs: | |
| build_and_preview: | |
| if: ${{ github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'workflow_dispatch' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Shortify commit sha | |
| id: shortify_commit | |
| shell: bash | |
| run: echo "sha_short=$(echo ${GITHUB_SHA::7})" >> $GITHUB_OUTPUT | |
| - name: Get branch | |
| id: get_branch | |
| shell: bash | |
| run: echo "ref_short=$(echo ${GITHUB_REF##*/})" >> $GITHUB_OUTPUT | |
| - name: Get Preview Channel ID | |
| id: get_preview_channel_id | |
| shell: bash | |
| run: echo "preview_channel_id=$(echo ${GITHUB_REF#*/})" >> $GITHUB_OUTPUT | |
| - name: Setup GH Actions | |
| id: checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Flutter and dependencies | |
| id: install_flutter | |
| uses: ./.github/actions/flutter-deps | |
| - name: Fetch packages and generate assets | |
| id: generate_assets | |
| uses: ./.github/actions/generate-assets | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # Optionally provide feedback service configuration if available | |
| FEEDBACK_API_KEY: ${{ secrets.FEEDBACK_API_KEY }} | |
| FEEDBACK_PRODUCTION_URL: ${{ secrets.FEEDBACK_PRODUCTION_URL }} | |
| TRELLO_API_KEY: ${{ secrets.TRELLO_API_KEY }} | |
| TRELLO_TOKEN: ${{ secrets.TRELLO_TOKEN }} | |
| TRELLO_BOARD_ID: ${{ secrets.TRELLO_BOARD_ID }} | |
| TRELLO_LIST_ID: ${{ secrets.TRELLO_LIST_ID }} | |
| # Matomo analytics configuration (optional). If not provided, analytics will be disabled in CI. | |
| MATOMO_URL: ${{ secrets.MATOMO_URL }} | |
| MATOMO_SITE_ID: ${{ secrets.MATOMO_SITE_ID }} | |
| ANALYTICS_DISABLED: true | |
| - name: Validate build | |
| id: validate_build | |
| uses: ./.github/actions/validate-build | |
| - name: Deploy Gleec Wallet web feature preview (Expires in 7 days) | |
| id: deploy_preview | |
| uses: FirebaseExtended/[email protected] | |
| with: | |
| repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
| firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_KOMODO_WALLET_OFFICIAL }}" | |
| channelId: "${{ steps.get_preview_channel_id.outputs.preview_channel_id }}" | |
| target: walletrc | |
| expires: 7d | |
| projectId: komodo-wallet-official | |
| - name: Deploy Gleec Wallet Web dev preview (`dev` branch) | |
| id: deploy_dev | |
| if: github.ref == 'refs/heads/dev' && github.event_name != 'workflow_dispatch' | |
| uses: FirebaseExtended/[email protected] | |
| with: | |
| repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
| firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_KOMODO_WALLET_OFFICIAL }}" | |
| channelId: dev-preview | |
| target: walletrc | |
| projectId: komodo-wallet-official |