-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.45 KB
/
dart.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
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: build flutter web app
env:
my_secret: ${{secrets.commit_secret}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
with:
flutter-version: '2.5.3'
- run: flutter pub get
- run: pub global activate get_cli
- run: get generate locales assets/locales on data/locales
#
# release:
#
- run: flutter build web --release --web-renderer html --base-href /toolbox/ # fix baseHref
- run: |
cd build/web
git init
git config --global user.email [email protected]
git config --global user.name hhglory
git status
git remote add origin https://${{secrets.commit_secret}}@github.com/hhstore/toolbox.git
git checkout -b gh-pages
git add --all
git commit -m "auto update by action"
git push origin gh-pages -f
# - run: git checkout gh-pages
# - run: \cp -rf build/web/ docs/
# - run: git add docs/
# - run: git mv -f docs/*.* .
# - run: git commit "auto update - github action"
# - run: git push origin gh-pages:gh-pages