Skip to content

Instantly share code, notes, and snippets.

@rodydavis
Last active June 19, 2022 11:15
Show Gist options
  • Save rodydavis/7c61237369811dc0a30a0db7d75286f4 to your computer and use it in GitHub Desktop.
Save rodydavis/7c61237369811dc0a30a0db7d75286f4 to your computer and use it in GitHub Desktop.
Build and Deploy Flutter Website to Flirebase Hosting
name: Build and Deploy Website
on: push
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'dev'
- run: flutter pub get
- run: flutter config --enable-web
- run: flutter build web
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: web-build
path: build/web
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: web-build
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting --public web-build
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
PROJECT_ID: default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment