Skip to content

Commit

Permalink
workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
bymoye authored Jul 9, 2024
1 parent 60a04ad commit 3765182
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Deploy Flutter Web App

on:
push:
branches:
- main # 当 main 分支有新的提交时触发

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable # or: beta, master (or main)
- run: flutter --version

- name: Install dependencies
run: flutter pub get

- name: Build Flutter web
run: flutter build web --wasm

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/web

0 comments on commit 3765182

Please sign in to comment.