-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Web Release | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
pull_request: | ||
branches: [ "main" ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Create Web Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: "12.x" | ||
cache: gradle | ||
- uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: "3.13.6" | ||
channel: 'stable' | ||
cache: true | ||
|
||
- name: Get dependencies | ||
run: flutter pub get | ||
|
||
- name: Start Web Release Build | ||
run: flutter build web --release | ||
|
||
- name: Upload Web Build Files | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: web-release | ||
path: ./build/web | ||
|
||
deploy: | ||
name: Deploy Web Build | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Download Web Release | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: web-release | ||
|
||
- name: Deploy to gh-pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.ACCESS_TOKEN }} | ||
publish_dir: ./ |