Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: PR 確認用の Firebase Hosting デプロイワークフローを追加 #111

Merged
merged 17 commits into from
Feb 13, 2024

Conversation

tatsutakein
Copy link
Member

@tatsutakein tatsutakein commented Feb 1, 2024

Issue

概要

Firebase Hosting のデプロイワークフローを追加します。

レビュー観点

  • 「PR 時のみ確認できるようにする」という課題に対して適切な PR となっているか
  • プレビューのデプロイが正常に動作しているか ( ci: PR 確認用の Firebase Hosting デプロイワークフローを追加 #111 (comment) )
  • ドキュメント ( docs/FIREBASE_HOSTING_PREVIEW.md ) を確認して作業を実施することで、新たなプロジェクトでもスムーズにセットアップができそうか

レビューレベル

  • Lv1: ぱっとみて違和感がないかチェックして Approve する
  • Lv2: 仕様レベルまで理解して、仕様通りに動くかある程度検証して Approve する
  • Lv3: 実際に環境で動作確認したうえで Approve する

レビュー優先度

  • すぐに見てもらいたい ( hotfix など ) 🚀
  • 今日中に見てもらいたい 🚗
  • 今日〜明日中で見てもらいたい 🚶
  • 数日以内で見てもらいたい 🐢

画像 / 動画

Before After Design

動作確認手順

備考

Copy link

github-actions bot commented Feb 1, 2024

Visit the preview URL for this PR (updated for commit a762de2):

https://flutter-mobile-project-template-catalog--pr111-feature-9j86jonu.web.app

(expires Tue, 20 Feb 2024 08:16:04 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 9ea56735a63d07a7cfe62eb204b0528284c37c23

@tatsutakein tatsutakein changed the title ci: Firebase Hosting のデプロイワークフローを追加 ci: PR 確認用の Firebase Hosting デプロイワークフローを追加 Feb 8, 2024
Comment on lines +1 to +15
{
"hosting": [
{
"target": "catalog",
"source": "apps/catalog",
"ignore": [
"firebase.json",
"**/.*"
],
"frameworksBackend": {
"region": "asia-east1"
}
}
]
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo-badge

Firebase のドキュメント を参考にフレームワーク対応の Hosting で構築しています

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo-badge

Firebase のドキュメント を参考に構築しています。

steps:
# https://github.com/marketplace/actions/checkout
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

以下の記事の「サードパーティのActionを利用する場合の対応」を参考に Full Changeset Hash で指定しています。

https://engineering.mercari.com/blog/entry/20230609-github-actions-guideline/

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good-badge
とても勉強になります!
他のワークフローの指定もいずれ修正したいですね👍

Comment on lines +82 to +104
## 4. Change workflow content

Modify `.github/workflows/firebase-hosting-pull-request.yaml`.

### 4-1. Remove repository name condition

To avoid inadvertent execution of the workflow when a new project is created based on this template project, we have
included an activation condition by repository name.
This description is no longer needed during setup, so please delete it.

![firebase-hosting-preview-02.png](images/firebase-hosting-preview-02.png)

### 4-2. Change Firebase Service Account name

Replace with the name of the Firebase Service Account created by the `firebase init hosting:github` command.

![firebase-hosting-preview-03.png](images/firebase-hosting-preview-03.png)

### 4-3. Change projectId to the ID of the relevant project

Replace the Firebase project.

![firebase-hosting-preview-04.png](images/firebase-hosting-preview-04.png)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo-badge

どこを変更するのかがテキストのみだと伝わりにくいかなと思い、画像も追加しています。

@tatsutakein tatsutakein marked this pull request as ready for review February 8, 2024 07:30
Copy link

github-actions bot commented Feb 8, 2024

Ready for review 🚀

@tatsutakein
Copy link
Member Author

@trm11tkr @warahiko
お手数ですが、ご確認いただけますと幸いです 🙏

Copy link
Contributor

@trm11tkr trm11tkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一点超 nits なコメントをしていますが、内容はLGTM です!
ご対応いただきありがとうございます!

steps:
# https://github.com/marketplace/actions/checkout
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good-badge
とても勉強になります!
他のワークフローの指定もいずれ修正したいですね👍

.gitignore Outdated Show resolved Hide resolved
Co-authored-by: trm11tkr <89247188+trm11tkr@users.noreply.github.com>
@tatsutakein
Copy link
Member Author

@trm11tkr
ご確認いただきありがとうございました!
いただいたご指摘を修正したため、お手数ですが再度ご確認いただけますと幸いです 🙏

Copy link
Contributor

@trm11tkr trm11tkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ご対応いただきありがとうございました!
LGTM

@tatsutakein tatsutakein merged commit 5919a22 into main Feb 13, 2024
5 checks passed
@tatsutakein tatsutakein deleted the feature/add-firebase-hosting branch February 13, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Pull Requestでアプリを確認できるようにする
2 participants