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: Deploy Flutter Web to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # 或你的主分支 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Flutter | |
uses: subosito/[email protected] | |
with: | |
channel: 'stable' | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Build Flutter Web | |
run: flutter build web --base-href=/flutter_web_dashboard_demo/ --no-tree-shake-icons | |
# working-directory: ncu_helper_web | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/web |