-
Notifications
You must be signed in to change notification settings - Fork 2
37 lines (37 loc) · 1.27 KB
/
main.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
name: Flutter Web
on:
push:
branches:
- main
jobs:
build:
name: Build Web
env:
my_secret: ${{secrets.commit}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: "stable"
- run: flutter config --enable-web
- run: flutter pub get
- run: flutter build web --release
- run: |
cd build/web
# replace the base path
sed -i 's#<base href="[^"]*">#<base href="/Chwazi/">#g' index.html
git init
# type configurations: your user.email and user.name followed lines
# git config --global user.email your_email
# git config --global user.name your_name
git config --global user.email [email protected]
git config --global user.name TravisRoad
git status
# change this remote url for examle your remote url is https://github.com/onatcipli/flutter_web.git then the following:
# https://github.com/TravisRoad/Chwazi.git
git remote add origin https://${{secrets.commit}}@github.com/TravisRoad/Chwazi.git
git checkout -b gh-pages
git add --all
git commit -m "update"
git push origin gh-pages -f