File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 release :
55 types : [published]
66 workflow_dispatch :
7+ push :
8+ branches :
9+ - ci/web-deployment # TEMP: remove after testing
710
811jobs :
912 deploy-ios :
@@ -175,3 +178,39 @@ jobs:
175178
176179 - name : Publish to Microsoft Store
177180 run : msstore publish . -v -id ${{ secrets.MICROSOFT_STORE_PRODUCT_ID }}
181+
182+ deploy-web :
183+ name : Build and Deploy Web
184+ runs-on : ubuntu-latest
185+ timeout-minutes : 15
186+ permissions :
187+ contents : write
188+ defaults :
189+ run :
190+ working-directory : example
191+
192+ steps :
193+ - uses : actions/checkout@v4
194+
195+ - uses : subosito/flutter-action@v2
196+ with :
197+ channel : stable
198+
199+ - name : Set fl_chart version
200+ working-directory : ${{ github.workspace }}
201+ run : |
202+ VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2 }')
203+ echo "USING_FL_CHART_VERSION=$VERSION" >> $GITHUB_ENV
204+
205+ - run : flutter pub get
206+
207+ - name : Build web
208+ run : flutter build web --release --wasm --base-href=/ --dart-define="USING_FL_CHART_VERSION=${{ env.USING_FL_CHART_VERSION }}"
209+
210+ - name : Deploy to GitHub Pages
211+ run : |
212+ git config user.name github-actions
213+ git config user.email github-actions@github.com
214+ git --work-tree build/web add --all
215+ git commit -m "Automatic deployment by github-actions"
216+ git push origin HEAD:gh-pages --force
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments