GitHub 页面重定向到其他站点

GitHub Pages redirects to a different site

所以我正在尝试使用 GitHub 页面部署我的 flutter web 应用程序,但我遇到了一个奇怪的问题。所以我的投资组合在 imgkl.github.io and I'm trying to deploy another app called fl_catalogue which has the 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

您可能没有更改 web/index.html

中的基本路径
  <!--
    If you are serving your web app in a path other than the root, change the
    href value below to reflect the base path you are serving from.

    The path provided below has to start and end with a slash "/" in order for
    it to work correctly.

    Fore more details:
    * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
  -->
  <base href="/">