我有一个 Flutter 应用程序作为我的用户 GH 页面。 我尝试添加另一个 flutter web 应用程序作为项目 gh 页面。 (通过手动 GitHub 操作工作流程)
sensn.github.io
sensn.github.io/article_field
问题:两个页面都加载相同的 flutter web 应用程序 1,该应用程序应该仅位于 user-GH 页面上。我认为这是缓存的问题,但不知道如何解决。
我期待项目 GH 页面显示粒子场应用程序。
相反,它显示来自用户 GH 页面的我的应用程序
来自项目 pahe 存储库的 Main.yml:
name: particle_field
on:
push:
branches:
- main
jobs:
build:
name: Build Web
env:
my_secret: ${{secrets.Commit_secret}}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'master'
- run: |
cd example
flutter config --enable-web
flutter pub get
flutter build web --release
- run: |
cd example/build/web
git init
# type configurations: your user.email and user.name followed lines
# git config --global user.email your_email
# git config --global user.name your_name
git config --global user.email ***
git config --global user.name ***
git status
# change this remote url for examle your remote url is https://github.com/onatcipli/particle_field.git then the following:
git remote add origin https://${{secrets.Commit_secret}}@github.com/sensn/particle_field.git
git checkout -b gh-pages
git add --all
git commit -m "update"
git push origin gh-pages -f
好吧,我必须在 main.yml 中设置基本 href
flutter 构建 web --release --base-href '/article_field/'