-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.09 KB
/
dart.yml
File metadata and controls
43 lines (36 loc) · 1.09 KB
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
# 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: Flutter Web Build CI
on:
push:
branches: [main]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'stable'
- name: Install dependencies
run: flutter pub get
- name: Build web
run: flutter build web
- name: Deploy
run: |
cd build/web
git init
git config user.name "CI"
git config user.email "flutter-ci@github.com"
git remote add secure-origin https://${{ secrets.ACCESS_TOKEN }}@github.com/NCHUSG/NCHUSG.github.io.git
git checkout -b gh-pages
git add .
git commit -m "Updated docs"
git push --force secure-origin gh-pages