Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter web app + Artifact could not be deployed error #368

Open
austinmilt opened this issue Aug 19, 2024 · 0 comments
Open

Flutter web app + Artifact could not be deployed error #368

austinmilt opened this issue Aug 19, 2024 · 0 comments

Comments

@austinmilt
Copy link

I'm trying to publish the Flutter default app (made with flutter create) to my repo's GitHub Pages. My workflow file is as follows:

name: Publish main branch to GitHub Pages

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
    contents: read
    pages: write      # to deploy to Pages
    id-token: write   # to verify the deployment originates from an appropriate source
  
jobs:
  build:
    runs-on: ubuntu-latest
    steps:

      - name: Clone the source repo
        uses: actions/checkout@v4

      # https://github.com/marketplace/actions/flutter-action
      - name: Set up Flutter
        uses: subosito/flutter-action@v2
        with:
          channel: stable
          flutter-version: 3.24.0

      - name: Build the web artifact
        run: |
          flutter pub get
          flutter test
          flutter build web --base-href /${{ github.event.repository.name }}/ --release
    
      - name: Configure Pages
        uses: actions/configure-pages@v4

      - name: Upload the web artifact
        uses: actions/upload-artifact@v4
        with:
          name: github-pages
          path: build/web

  # https://github.com/actions/deploy-pages
  deploy:
    runs-on: ubuntu-latest
    needs: build
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}

    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4

The build artifact is successfully uploaded and appears correct

With the provided path, there will be 31 files uploaded
Artifact name is valid!
Root directory input is valid!
Beginning upload of artifact content to blob storage
Uploaded bytes 7436117
Finished uploading artifact content to blob storage!
SHA256 hash of uploaded artifact zip is 2669ae79bd709d99ca67b64104e824cbabe608a56ab8ef3788a621e007f410[15](https://github.com/austinmilt/cthulu_character_creator/actions/runs/10445530658/job/28921814519#step:6:16)
Finalizing artifact upload
Artifact github-pages.zip successfully finalized. Artifact ID 1825503194
Artifact github-pages has been successfully uploaded! Final size is 74361[17](https://github.com/austinmilt/cthulu_character_creator/actions/runs/10445530658/job/28921814519#step:6:18) bytes. Artifact ID is 1825503194
Artifact download URL: https://github.com/austinmilt/cthulu_character_creator/actions/runs/10445530658/artifacts/[18](https://github.com/austinmilt/cthulu_character_creator/actions/runs/10445530658/job/28921814519#step:6:19)25503194

This works up until deploy-pages which fails with error

Artifact could not be deployed. Please ensure the content does not contain any hard links, symlinks and total size is less than 10GB.

I've confirmed there are no (file) links.

Debug logs (attached)
logs_27310942169.zip
do not give me more info.

I've seen examples of flutter web apps successfully publishing to GitHub Pages, so I have some confidence this should work. I'm wondering if there are some gotchas I'm missing, or if there's another way to debug this process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant