-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
32 lines (29 loc) · 1.07 KB
/
gh-pages.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
name: Gh-Pages
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
- name: Set fl_chart Version
run: |
VERSION=$(grep "version:" pubspec.yaml | awk '{ print $2 }')
echo "USING_FL_CHART_VERSION=$VERSION" >> $GITHUB_ENV
- run: flutter config --enable-web
working-directory: example
- run: flutter build web --release --wasm --base-href=/ --dart-define="USING_FL_CHART_VERSION=${{ env.USING_FL_CHART_VERSION }}"
working-directory: example
- run: git config user.name github-actions
working-directory: example
- run: git config user.email [email protected]
working-directory: example
- run: git --work-tree build/web add --all
working-directory: example
- run: git commit -m "Automatic deployment by github-actions"
working-directory: example
- run: git push origin HEAD:gh-pages --force
working-directory: example