-
Notifications
You must be signed in to change notification settings - Fork 0
chore/Firebase Hosting, GitHub Actions 파일 추가 #25
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "projects": { | ||
| "default": "ttorang" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # This file was auto-generated by the Firebase CLI | ||
| # https://github.com/firebase/firebase-tools | ||
|
|
||
| name: Deploy to Firebase Hosting on merge | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| build_and_deploy: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: npm ci && npm run build | ||
| - uses: FirebaseExtended/action-hosting-deploy@v0 | ||
| with: | ||
| repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
| firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TTORANG }} | ||
| channelId: live | ||
| projectId: ttorang |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # This file was auto-generated by the Firebase CLI | ||
| # https://github.com/firebase/firebase-tools | ||
|
|
||
| name: Deploy to Firebase Hosting on PR | ||
| on: pull_request | ||
| permissions: | ||
| checks: write | ||
| contents: read | ||
| pull-requests: write | ||
| jobs: | ||
| build_and_preview: | ||
| if: ${{ github.event.pull_request.head.repo.full_name == github.repository }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - run: npm ci && npm run build | ||
| - uses: FirebaseExtended/action-hosting-deploy@v0 | ||
| with: | ||
| repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
| firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_TTORANG }} | ||
| projectId: ttorang |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "hosting": { | ||
| "public": "dist", | ||
| "ignore": [ | ||
| "firebase.json", | ||
| "**/.*", | ||
| "**/node_modules/**" | ||
| ], | ||
| "rewrites": [ | ||
| { | ||
| "source": "**", | ||
| "destination": "/index.html" | ||
| } | ||
| ] | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firebase 호스팅 설정에 캐시 제어 헤더를 추가하여 성능을 최적화하는 것을 제안합니다. Vite는 빌드 시 에셋 파일(JS, CSS 등)에 고유한 해시를 포함하므로, 이 파일들은 브라우저에 오래 캐시하여 로딩 속도를 높일 수 있습니다. 반면,
index.html파일은 캐시하지 않아야 사용자가 배포 시 항상 최신 버전의 애플리케이션을 받을 수 있습니다.다음과 같이
headers설정을 추가하여 캐시 동작을 명시적으로 제어할 수 있습니다.