1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Flutter web App deployed via GitHub actions shows wrong app

Discussão em 'Mobile' iniciado por Stack, Outubro 3, 2024 às 12:32.

  1. Stack

    Stack Membro Participativo

    I have a Flutter App As my User-GH Pages. I tried to add another flutter web app as a project-gh pages. (Via manual GitHub actions workflow)

    sensn.github.io

    sensn.github.io/particle_field

    Problem: both pages load the same flutter web app 1 which is supposed to be only on the user-GH page. I think it's a problem with Caching but don't know how to fix.

    I was expecting the project GH page to show the particle field app.

    Instead it shows My App from user GH Page

    Main.yml from project-pahe repo:

    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

    Continue reading...

Compartilhe esta Página