我有一个带有目标的多站点配置。 使用npx firebase-tools deploy --only hosting
或npx firebase-tools deploy --only hosting:bbbb
可以正常工作。 但是如果我使用新的 GitHub 操作,它就失败了:
/usr/local/bin/npx firebase-tools hosting:channel:deploy pr22-blah --expires 30d --project blah-dev --json
在本地运行相同的东西以相同的方式失败。 错误是:
$ npx firebase-tools hosting:channel:deploy pr22-blah --only bbb --expires 30d --project blah-dev --json
{
"status": "error",
"error": "Hosting configs should only include either \"site\" or \"target\", not both."
}
请注意,我在那里使用的命令添加了--only bbb
。 无论有没有,该命令都会以相同的方式失败。
另请注意,我的firebase.json
根本没有列出"site"
。 见下文:
.firebaserc:
{
"projects": {
"default": "blah-dev",
"dev": "blah-dev",
"prod": "blah-io"
},
"targets": {
"blah-io": {
"hosting": {
"aaa": [
"blah-aaa"
],
"boilerplate": [
"blah-boilerplate"
],
"bbb": [
"blah-bingo"
]
}
},
"blah-dev": {
"hosting": {
"aaa": [
"blah-aaa-dev"
],
"boilerplate": [
"blah-boilerplate-dev"
],
"bbb": [
"blah-bbb-dev"
]
}
}
}
}
firebase.json
{
"firestore": {...},
"database": {...},
"functions": {...},
"hosting": [
{
"target": "aaa",
"public": "packages/aaa/build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
{
"target": "boilerplate",
"public": "packages/boilerplate/build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
{
"target": "bbb",
"public": "packages/bbb/build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
],
"emulators": {...}
}
火力基地工具: 。 npx firebase-tools --version
-> 8.14.0
平台: OSX,还有 GitHub Actions 默认镜像
往上看。
往上看。 运行hosts:channel :deploy 命令
它部署
{
"status": "error",
"error": "Hosting configs should only include either \"site\" or \"target\", not both."
}
( --debug
标志在前面添加了很多 HTTP 日志记录噪音,但都是 200 秒。)
感谢您的报告。 我已经解决了,会尽快解决。
我在不使用频道而只使用 firebase deploy --only 托管时收到此错误:firebase deploy --only hosting:$CI_COMMIT_REF_SLUG -m "Tag $TAG Pipeline $CI_PIPELINE_ID, build $CI_BUILD_ID" --non-interactive
@Mistic92请打开一个包含更多详细信息和复制步骤的新问题。
最有用的评论
感谢您的报告。 我已经解决了,会尽快解决。