【发布时间】:2020-04-18 04:47:47
【问题描述】:
我正在尝试使用 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:
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-tools?
我试过https://github.com/marketplace/actions/github-action-for-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: ****
【问题讨论】:
-
是的,我尝试使用
w9jds/firebase-action,但出现此错误。Error: An unexpected error has occurred. ##[error]Docker run failed with exit code 2
标签: firebase github firebase-cli github-actions