Gitlab CI管道部署到Firebase

Gitlab CI管道部署到Firebase,firebase,gitlab-ci,Firebase,Gitlab Ci,对Firebase宿主运行构建作出反应 文件被上传到Firebase,没有显示页面,资源被下载,因为它们可以在开发工具的网络选项卡中看到。 当从本地环境部署应用程序时,它工作正常(在我的机器xD上运行) firebase.json: gitlab-ci.yam image: node:10.11.0 # can be upgraded, depending on your node version used stages: - build - deploy cache: pa

对Firebase宿主运行构建作出反应

文件被上传到Firebase,没有显示页面,资源被下载,因为它们可以在开发工具的网络选项卡中看到。 当从本地环境部署应用程序时,它工作正常(在我的机器xD上运行)

firebase.json:

gitlab-ci.yam

image: node:10.11.0 # can be upgraded, depending on your node version used
stages:
    - build
    - deploy
cache:
  paths:
    - ref_project/node_modules/
build:
    stage: build
    script:
        - echo "Build"
        - cd ref_project
        - npm i
        - CI=false npm run build   
    artifacts:
        paths:
            - ./ref_project/build
            - ./ref_project/firebase.json
            - ./ref_project/.firebaserc
    only:
        - Production
deploy:
    stage: deploy
    script:
        - echo "Deploy"
        - cd ref_project
        - npm -g config set user root
        - npm i -g  firebase-tools
        - firebase use ref-project-996a7 --token $FIREBASE_TOKEN
        - firebase deploy --only hosting --token $FIREBASE_TOKEN  
    only:
        - Production

我曾经有过这个问题。我在错误的属性中键入了
firebase.json
文件。你可以开始检查了。
image: node:10.11.0 # can be upgraded, depending on your node version used
stages:
    - build
    - deploy
cache:
  paths:
    - ref_project/node_modules/
build:
    stage: build
    script:
        - echo "Build"
        - cd ref_project
        - npm i
        - CI=false npm run build   
    artifacts:
        paths:
            - ./ref_project/build
            - ./ref_project/firebase.json
            - ./ref_project/.firebaserc
    only:
        - Production
deploy:
    stage: deploy
    script:
        - echo "Deploy"
        - cd ref_project
        - npm -g config set user root
        - npm i -g  firebase-tools
        - firebase use ref-project-996a7 --token $FIREBASE_TOKEN
        - firebase deploy --only hosting --token $FIREBASE_TOKEN  
    only:
        - Production