Skip to content

Help needed to setup CI/CD for Web frameworks using Github Actions. #58

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

Open
bk973 opened this issue Dec 28, 2022 · 4 comments
Open

Help needed to setup CI/CD for Web frameworks using Github Actions. #58

bk973 opened this issue Dec 28, 2022 · 4 comments

Comments

@bk973
Copy link

bk973 commented Dec 28, 2022

I am using next Js with dynamic content. Here's my workflow file:

`# This file was auto-generated by the Firebase CLI

https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
#- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_MICROLIPA_F24FA }}'
projectId: microlipa-f24fa`

End the Job exits with this error:

Error: Web frameworks with dynamic content do not yet support deploying to preview channels

The process '/usr/local/bin/npx' failed with exit code 1
Error: The process '/usr/local/bin/npx' failed with exit code 1

@fahadahmed
Copy link

Hello team,

I am facing the same issue. I am trying to deploy my NextJS app to Firebase Hosting after enabling FIREBASE_CLI_EXPERIMENTS in Github Actions, I get the error message Web frameworks with dynamic content do not yet support deploying to preview channels when the action is trying to create a preview channel to deploy the app. The app builds successfully in my build step.

Suggested implementation of Github Actions:
firebase/firebase-tools#5069

The details of the Github Action are here:
https://github.com/fahadahmed/fhdamd/actions/runs/4006424386/jobs/6877928240

Screenshot 2023-01-26 at 9 03 35 am

It doesnt really help to allow us to develop apps with dynamic content if the whole dev workflow is not implemented. Would be great if this is looked at.

@jamesdaniels
Copy link
Collaborator

jamesdaniels commented Jan 26, 2023

@fahadahmed the core issue ATM is that Cloud Functions for Firebase don't support previews, it's either prod or nothing, so it doesn't fit well. This is something we're looking into but don't have timelines to share

@fahadahmed
Copy link

Hi @jamesdaniels , thanks for the reply. While not appropriate, will try and see if Github actions can be used to deploy to production. Might adapt the dev workflow to deploy to another Firebase project and tag it as staging.

Thanks again for the quick response.

@MichaelVIU
Copy link

any update on this?

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

4 participants