【发布时间】:2021-05-03 14:39:23
【问题描述】:
所以我正在尝试使用 GitHub 页面部署我的 Flutter Web 应用程序,但我遇到了一个奇怪的问题。所以我在imgkl.github.io 上有我的投资组合,我正在尝试部署另一个名为fl_catalogue 的应用程序,它的URL 是imgkl.github.io/fl_catalogue/。但是当我尝试使用 fl_catalogue 应用程序时,它会将我带到我的作品集。
我正在使用此工作流程部署站点。
name: Flutter Web
on:
push:
branches:
- master
jobs:
build:
name: Build Web
env:
my_secret: ${{secrets.commit_secret}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v1
with:
channel: 'beta'
- run: flutter config --enable-web
- run: flutter pub get
- run: flutter build web --release
- run: |
cd build/web
git init
git config --global user.email my_email
git config --global user.name Imgkl
git status
git remote add origin https://${{secrets.commit_secret}}@github.com/Imgkl/fl_catalogue.git
git checkout -b gh-pages
git add --all
git commit -m "update"
git push origin gh-pages -f
【问题讨论】:
-
那么您打算如何进行部署?你的源代码/配置是什么样的?
-
@eis 我已经用我用来部署两个项目的工作流程更新了我的问题。
标签: flutter github github-pages flutter-web