Skip to content

chore: Update dependencies fixes #99 (#100) #16

chore: Update dependencies fixes #99 (#100)

chore: Update dependencies fixes #99 (#100) #16

name: Generate Web Build & Deploy To Vercel
on:
push:
branches: [ main ]
env:
flutter_version: '3.24.1'
flutter_channel: 'stable'
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
jobs:
generate_web_build:
name: Generate Web Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- name: Setup Flutter
uses: subosito/[email protected]
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
cache: true
- name: Clean Project, Get Dependencies & Generate Required Code
run: |
cd .scripts/
bash ./install.sh
- name: Run flutter test
run: |
flutter test
- name: Generate Web Build
run: |
cd .scripts/
bash ./web_build.sh
- name: Save Build Folder As Artifact
uses: actions/upload-artifact@v4
with:
name: web_build_folder
path: build/web
deploy_web_build_to_vercel:
name: Deploy Web Build To Vercel
needs: generate_web_build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Build Folder
run: |
mkdir build
cd build
- name: Download Web Build Folder
uses: actions/download-artifact@v4
with:
name: web_build_folder
path: build/
- name: Install Vercel CLI
run: |
(cd build && npm install --global vercel@latest)
- name: Pull Vercel Environment Information
run: |
(cd build && vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }})
- name: Build Project Artifacts
run: |
(cd build && vercel build --prod --token=${{ secrets.VERCEL_TOKEN }})
- name: Deploy Project Artifacts to Vercel
run: |
(cd build && vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }})