FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] Fails to deploy NextJS app

Open
#254 7 comments 11 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

I'm able to deploy my NextJS app directly (`firebase deploy`), however when I deploy via a PR or Merge action I get an error.

My repo is structured like so (the next app is in /frontend)
- firebase.json
- .github/workflows/firebase-hosting-merge.yml
- frontend/pages
- functions

My firebase.json is:
```
{
"functions": {
"source": "functions"
},
"hosting": {
"source": "frontend",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
}
}
```

### Action config

```
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
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SDXCRYPTO_ALGOVERA }}'
projectId: sdxcrypto-algovera
```

### Error message

Error: Cannot deploy a web framework to hosting because the experiment webframeworks is not enabled. To enable webframeworks run firebase experiments:enable webframeworks

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

### Expected behavior

Deploys sucessfully.
I have enabled the webframeworks experiment and re-tried but to no avail.

### Actual behavior

Fails to deploy.

Contributor guide

Open the contributing guide

Research direction

Start with firebase.json and .github/workflows/firebase-hosting-merge.yml, then reproduce the PR deployment using the FirebaseExtended/action-hosting-deploy action. Investigate why the webframeworks experiment is not recognized in that workflow despite being enabled. Done means the PR or merge deployment completes successfully for the NextJS app under frontend.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase, github-actions, next.js, typescript
Domain
ci-cd, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.