使用 Flutter Web 操作部署到 GitHub Pages 不起作用。
我总是收到空白页。
任何帮助表示赞赏。
我正在 GitHub Actions 上使用以下管道
name: Deploy to GitHub Pages
on:
push:
branches:
- master
permissions:
contents: read
pages: write
id-token: write
# Deploy to the github-pages environment
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
working-directory: ${{env.working-directory}}
- name: Build web app
run: flutter build web
working-directory: ${{env.working-directory}}
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: build/web/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2