FlutterKaigi / conference-app-2023

The Official Conference Application for FlutterKaigi 2023
https://flutterkaigi.jp/conference-app-2023/
Apache License 2.0
132 stars 27 forks source link

root以外からのアクセス時に `index.html` にリダイレクトする #113

Closed itome closed 1 year ago

itome commented 1 year ago

close: #112

https://github.com/rafgraph/spa-github-pages

こちらのリポジトリを参考に404ページに index.html へのリダイレクトを設定しました。

itome commented 1 year ago

@koji-1009 以下のようなエラーでFirebase Hostingへのデプロイに失敗しています。

/home/runner/work/_actions/FirebaseExtended/action-hosting-deploy/v0/bin/action.min.js:2102
        throw new Error(`Input required and not supplied: ${name}`);
        ^

Error: Input required and not supplied: firebaseServiceAccount

GitHub Actionsはフォークしたブランチからフォーク元のシークレットを参照できないので、以下の記事のような対応が必要みたいです。 https://securitylab.github.com/research/github-actions-preventing-pwn-requests/

koji-1009 commented 1 year ago

@itome お知らせありがとうございます!

単純に対応すると pull_request_target を利用すれば良さそうなのですが、tokenの漏洩リスクを下げるために、何かしら挟んだほうが良さそうですね。対応検討しますので、少々お待ちください 🙇

github-actions[bot] commented 1 year ago

PR: 113 preview link

koji-1009 commented 1 year ago

@itome 遅くなりすいません! hostingのリンクを添付できるようになりました。現在問題があり、commitのたびにcommentが増えてしまいます。。 どちらも同じリンクとなるため、最新のコメントのリンクを参照していただければ、検証環境をご確認いただけるかと。不具合の修正には、もう少々お時間をください 🙏

koji-1009 commented 1 year ago

上記問題解消しました!

itome commented 1 year ago

@koji-1009 数日体調を崩しており対応遅くなりました! CIの実行にメンテナのApproveが必要と出ているのですが見ていただけますか?

koji-1009 commented 1 year ago

@itome 実行しました!

koji-1009 commented 1 year ago

preview更新されています。コメントにupdated atの日付が表示されているか、前のものを決して新規にコメントされる仕様にすると良さそうですね。。こちらは後ほど修正します 🙏

itome commented 1 year ago

@koji-1009 ありがとうございます!実装完了したのでPRをあけました。