release(dev): v0.24.0-dev.1 #184
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Demo Web Page | |
on: | |
push: | |
branches: | |
- master | |
tags-ignore: | |
- v* | |
jobs: | |
build: | |
name: Flutter Web build and hosting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.10.x' | |
channel: 'stable' | |
cache: true | |
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' | |
- name: Enable Web | |
run: flutter config --enable-web | |
working-directory: ./example | |
- name: Install dependencies | |
run: flutter packages get | |
working-directory: ./example | |
- name: Build Web | |
run: flutter build web | |
working-directory: ./example | |
- name: Fix service worker for GitHub Pages | |
run: sed -i '/ \"\/\",$/d' example/build/web/flutter_service_worker.js | |
- name: Deploy | |
run: | | |
cd example/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/abc873693/ap_common.git | |
git checkout -b gh-pages | |
git add . | |
git commit -m "Updated site" | |
git push --force secure-origin gh-pages |