Skip to content

Commit

Permalink
Create dart.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ksw2000 authored Dec 1, 2021
1 parent 7a9be76 commit 71bbb81
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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:
flutter-version: '2.2.0'

- 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 "[email protected]"
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

0 comments on commit 71bbb81

Please sign in to comment.