FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] Wrong URL on success message when using "target" option

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

Description

Suppose I have 2 hosting sites on my project: **my-app** & **my-blog**

.firebaserc:
```json
{
"projects": {
"default": "project-name"
},
"targets": {
"project-name": {
"hosting": {
"blog": [
"my-blog"
]
}
}
}
}
```

firebase.json:
```json
{
"hosting": {
"target": "blog",
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
```

Action:
```yaml
name: Deploy to Firebase Hosting on merge
"on":
push:
branches:
- master
jobs:
build_and_deploy:
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 }}"
channelId: live
projectId: project-name
target: blog
```

Output:
```sh
Deploying to production site
/usr/local/bin/npx firebase-tools deploy --only hosting:blog --project project-name --json
***
"status": "success",
"result": ***
"hosting": "sites/my-blog/versions/75b65aed28bd655d"
***
***
***
details_url: 'https://my-app.web.app/',
conclusion: 'success',
output: ***
title: 'Production deploy succeeded',
summary: '[my-app.web.app](https://my-app.web.app/)'
***
***
```

The process is work as expected. I got my site running on `my-blog.web.app`. But, as you can see from the output in the `details_url` and `output.summary`, it output **my-app** instead of **my-blog**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.