-
Notifications
You must be signed in to change notification settings - Fork 149
53 lines (49 loc) · 1.48 KB
/
example.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Build example in Prod
on: [workflow_dispatch]
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: gradle
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:'
- name: Flutter Doctor
run: flutter doctor
working-directory: ./
- name: Upgrades flutter
run: flutter upgrade
working-directory: ./
- name: Enable Web
run: flutter config --enable-web
working-directory: ./example
- name: Install dependencies
run: flutter packages get
working-directory: ./
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 15
# - name: Install dependencies
# run: |
# flutter clean
# flutter pub upgrade
# working-directory: ./
- name: Build Web
run: flutter build web
working-directory: ./example
- name: Fix PWA
run: sed -i'.js' -e 's+"/"+""+g' flutter_service_worker.js #https://github.com/flutter/flutter/issues/68449
working-directory: ./example/build/web
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./example/build/web