LoginSignup
3
3

More than 5 years have passed since last update.

BitBucketのPipelineでfirebaseに自動デプロイ

Posted at

firebaseトークン取得

プロジェクト配下に移動して以下コマンド

project$ firebase login:ci

ログインすればトークンが発行される

環境設定

画面右の歯車アイコンからトークンを登録

無題.png

Name FIREBASE_TOKEN
Value {発行したトークン}

bitbucket-pipelines.ymlの編集

bitbucket-pipelines.yml
image: node:6.9.4

pipelines:
  default:
    - step:
        caches:
          - node
        script: 
          - export FIREBASE_TOKEN=$FIREBASE_TOKEN
          - npm install -g firebase-tools
          - cd ./client // 任意:デプロイしたいモジュールがある場所に移動
          - npm install
          - firebase deploy --only hosting --token ${FIREBASE_TOKEN}

以上でfireabaseのHostingだけがデプロイされる
結構時間かかる

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3