Skip to content

Commit

Permalink
chore: action
Browse files Browse the repository at this point in the history
  • Loading branch information
xcc3641 committed Oct 2, 2023
1 parent 77f2bd9 commit 111c3b1
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/web-release.yaml
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: ./

0 comments on commit 111c3b1

Please sign in to comment.