使用Github操作的Firebase部署
我正在尝试使用Github的操作将代码部署到firebase 我收到这个错误使用Github操作的Firebase部署,firebase,github,firebase-cli,github-actions,Firebase,Github,Firebase Cli,Github Actions,我正在尝试使用Github的操作将代码部署到firebase 我收到这个错误 success Installed "firebase-tools@7.11.0" with binaries: - firebase Done in 12.99s. /home/runner/work/_temp/30a2b6cb-a097-4d73-ac92-5379d0cc6ccf.sh: line 2: firebase: command not found 我的部署代码如下 deploy
success Installed "firebase-tools@7.11.0" with binaries:
- firebase
Done in 12.99s.
/home/runner/work/_temp/30a2b6cb-a097-4d73-ac92-5379d0cc6ccf.sh: line 2: firebase: command not found
我的部署代码如下
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@v1
with:
name: dist
- name: yarn add firebase-tools
run: |
yarn global add firebase-tools
firebase deploy ${{ secrets.firebase_token }} --only hosting:**** --non-interactive
env:
PROJECT_ID: ****
如何在全球范围内添加firebase工具
我试过了
但是得到了错误
setting firebase project to ***
Now using project ***
=== Deploying to '***'...
i deploying hosting
✔ Deploy complete!
Project Console: *******************
Error: An unexpected error has occurred.
##[error]Docker run failed with exit code 2
这是代码
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@v1
with:
name: dist
- name: Deploy to Firebase
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:****
env:
FIREBASE_TOKEN: ${{ secrets.firebase_token }}
PROJECT_ID: ****
这是在2005年报告的
对我来说,当我删除“——仅托管:prod
”时,它就起作用了这可能取决于计划 除非您在
firebase.json
文件中设置了多域托管的站点,并且可以部署的站点之一称为prod
,否则您不能保留——仅托管:prod
你看到文件了吗?是的,我试着使用
w9jds/firebase操作
,但出现了这个错误<代码>错误:发生意外错误##[错误]Docker运行失败,退出代码为2在我的主机中,有两个站点。我想在其中一个中部署。这是我的firebase.json{“hosting”:{“public”:“public/site_name”,“ignore”:[“firebase.json”、“/.*”、“*/node_modules/”]、“rewrites”:[{“source”:“*”、“destination”:“/index.html”}}可能是出了什么事here@AwaisNawaz托管:***
:***
需要匹配一个站点名称。我使用w9jds/firebase action
,我试图了解到底部署到firebase的是什么。它是build
目录还是整个rep?我在firebase文档和行动代码中都找不到答案。@JohnDoe你是说?如图所示,它可以部署您上载的内容:。它部署工件构建并上传。
Docker run failed with exit code 2