2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

CICDからfirebase deployする

2
Posted at

はじめに

  • CICDから自動でfirebaseにデプロイしたい

問題

  • ローカルとは環境違うのでコマンドに対話形式ではなく認証情報を渡さないといけない。ローカルだとブラウザからログインして認証している

解決

1. firebase login:ciでトークンを作る

% firebase login:ci

✔  Success! Use this token to login on a CI server:
token-value-token-value-token-value-token-value-token-value-token-value
Example: firebase deploy --token "$FIREBASE_TOKEN"

2. https://github.com/username/reponame/settings/secrets/actions からトークンを登録する

3. Github Actionsで呼び出す

      - name: Firebase Deploy
        run: ./node_modules/.bin/firebase deploy --token ${{ secrets.FIREBASE_TOKEN }}

終わりに

こちら参考にさせて頂きました

2
0
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
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?