This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
🆙 Update dependency com.android.tools.build:gradle to v8 #177
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
name: Deploy to Firebase Hosting on PR | |
on: | |
pull_request: | |
paths: | |
- '.fvm/fvm_config.json' | |
- 'apps/**' | |
- 'packages/**' | |
jobs: | |
build_and_preview: | |
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
# 本番環境用の .env を作成 | |
- name: create .env | |
run: | | |
touch .env | |
echo LIFF_ID=${{secrets.LIFF_ID}} >> .env | |
echo SUPABASE_URL=${{secrets.SUPABASE_URL}} >> .env | |
echo SUPABASE_ANON_KEY=${{secrets.SUPABASE_ANON_KEY}} >> .env | |
working-directory: ./apps/frontend | |
- name: Parse Flutter version | |
uses: kuhnroyal/flutter-fvm-config-action@v1 | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | |
channel: ${{ env.FLUTTER_CHANNEL }} | |
cache: true | |
- name: Prepare Melos | |
run: echo "MELOS_SDK_PATH=${{ env.FLUTTER_ROOT }}" >> $GITHUB_ENV | |
- name: Install Melos | |
uses: bluefireteam/melos-action@v2 | |
# Web ビルドを実行 | |
- name: web build | |
run: melos run build:prod:web | |
# Firebase Hosting にデプロイ | |
- id: deploy | |
uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
repoToken: '${{ secrets.GITHUB_TOKEN }}' | |
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_TWORABS_NITO }}' | |
projectId: tworabs-nito |