Update Firebase action version in GitHub Actions workflow for deployment #2
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
| name: Build & Deploy Website | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| hosting: | |
| name: Deploy Website | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Checkout the repository | |
| - uses: actions/checkout@v2 | |
| # Install flutter command | |
| - uses: subosito/flutter-action@v1 | |
| with: | |
| channel: stable | |
| # Build the website # flutter build web --web-renderer html --release | |
| - name: Build Website | |
| run: | | |
| flutter config --enable-web | |
| flutter pub get | |
| # flutter build web --web-renderer html --release | |
| flutter build web --release | |
| working-directory: ./ | |
| # Deploy Firebase Hosting | |
| - name: Deploy Firebase Hosting | |
| uses: w9jds/firebase-action@v12.9.0 | |
| with: | |
| args: deploy --only hosting:fb-server-key-to-access-token | |
| env: | |
| FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
| PROJECT_PATH: ./ |