If you are building server-rendered Angular or Next.js apps, check out next-generation Firebase App Hosting, a full-stack solution for modern web frameworks.
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Dağıtımları Firebase Hosting ile GitHub Action üzerinden entegre edebilirsiniz. Bu GitHub Action'ın sizin için yapabilecekleri:
GitHub deponuzdaki her çekme isteği için yeni bir önizleme kanalı (ve ilişkili önizleme URL'si) oluşturur.
Sizin ve her incelemecinin, uygulamanızın "önizleme" sürümünde PR'nin değişikliklerini görüntüleyip test edebilmesi için PR'ye önizleme URL'sini içeren bir yorum ekler.
İlişkili önizleme kanalına otomatik olarak dağıtarak her commit'teki değişikliklerle önizleme URL'sini günceller. URL, her yeni işlemeyle değişmez.
(İsteğe bağlı) Çekme isteği birleştirildiğinde GitHub deponuzun mevcut durumunu canlı kanalınıza dağıtır.
Hatırlatma: Önizleme URL'lerini kullanırken uygulamanız, Firebase projenizin gerçek arka uç kaynaklarıyla etkileşim kurar.
Firebase Hosting'ya dağıtmak için GitHub Action'ı ayarlayın.
GitHub deposu (herkese açık veya özel) oluşturun ya da mevcut bir depoyu kullanın. Depo için yönetici izinlerine sahip olmanız gerekir.
Deponuzun yerel bir sürümünde firebase init komutunu kullanarak Firebase Hosting ayarlayın.
Hosting hizmetini ayarlamadıysanız bu komutun şu sürümünü yerel dizininizin kökünden çalıştırın:
firebase init hosting
Hosting'ı DAHA ÖNCE ayarladıysanız Hosting'ın GitHub Action bölümünü ayarlamanız yeterlidir. Komutun bu sürümünü yerel dizininizin kökünden çalıştırın:
firebase init hosting:github
CLI istemlerini uygulayın. Komut, GitHub Action'ı ayarlama işlemini otomatik olarak gerçekleştirir:
Firebase projenizde Firebase Hosting'a dağıtım izni olan bir hizmet hesabı oluşturur.
Bu hizmet hesabının JSON anahtarını şifreler ve belirtilen GitHub deposuna GitHub gizli anahtarı olarak yükler.
Yeni oluşturulan gizli diziye referans veren GitHub iş akışı yaml yapılandırma dosyalarını yazar. Bu dosyalar, GitHub Action'ı Firebase Hosting'ya dağıtılacak şekilde yapılandırır.
GitHub'da yeni bir dal oluşturun ve CLI tarafından oluşturulan iş akışı yaml dosyalarını işleyin.
Dalı GitHub deponuzda yayınlayın.
Dalı birleştirin.
Hepsi bu kadar! Bu GitHub deposundaki sonraki tüm çekme istekleri otomatik olarak kendi "önizleme URL'sini" alır.
GitHub Action hakkında daha fazla bilgi
Firebase, "Firebase Hosting'ya dağıt" GitHub İşlemi'ni açık kaynaklı bir proje olarak sürdürür.
Kaynak kodunu görüntüleyin.
"Firebase Hosting konumuna dağıt" GitHub Action'ı, önizleme kanalının geçerlilik bitiş tarihini özelleştirme veya PR birleştirildiğinde dağıtılacak canlı olmayan bir kanal ayarlama gibi daha fazla yapılandırmaya olanak tanır.
Mevcut yapılandırma seçenekleri hakkında bilgi edinin.
Genel olarak GitHub Actions hakkında daha fazla bilgi edinin.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-08-31 UTC."],[],[],null,["\u003cbr /\u003e\n\nYou can integrate deploys to Firebase Hosting via a GitHub Action. Here's\nwhat this GitHub Action can do for you:\n\n- Creates a new preview channel (and its associated preview URL) for every PR on\n your GitHub repository.\n\n- Adds a comment to the PR with the preview URL\n so that you and each reviewer can view and test the PR's changes in a\n \"preview\" version of your app.\n\n- Updates the preview URL with changes from each commit by automatically\n deploying to the associated preview channel. The URL doesn't change with each\n new commit.\n\n- *(Optional)* Deploys the current state of your GitHub repo to your live\n channel when the PR is merged.\n\nReminder: When using preview URLs, your app interacts with the *real* backend\nresources of your Firebase project.\n\nSet up the GitHub Action to deploy to Firebase Hosting\n\n1. Create a GitHub repository (public or private) or use an existing one. You\n must have admin permissions for the repository.\n\n2. In a local version of your repo, set up Firebase Hosting using the\n [`firebase init` command](/docs/hosting/quickstart#initialize).\n\n - If you've NOT set up Hosting, run this version of the command\n from the root of your local directory:\n\n ```\n firebase init hosting\n ```\n - If you've ALREADY set up Hosting, then you just need to set up the\n GitHub Action part of Hosting. Run this version of the command from\n the root of your local directory:\n\n ```\n firebase init hosting:github\n ```\n3. Follow the CLI prompts, and the command will automatically take care of\n setting up the GitHub Action:\n\n - Creates a service account in your Firebase project with permission to\n deploy to Firebase Hosting.\n\n - Encrypts that service account's JSON key and uploads it to the specified\n GitHub repository as a\n [GitHub secret](//docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets).\n\n - Writes GitHub workflow `yaml` configuration files that reference the\n newly created secret. These files configure the GitHub Action to deploy to\n Firebase Hosting.\n\n4. In GitHub, create a new branch and commit the workflow `yaml` files created\n by the CLI.\n\n5. Publish the branch to your GitHub repository.\n\n6. Merge the branch.\n\nThat's it! Any subsequent PR in this GitHub repo will automatically get its own\n\"preview URL\"!\n\nLearn more about the GitHub Action\n\n- Firebase maintains the \"Deploy to Firebase Hosting\" GitHub Action as an\n open-source project.\n [View the source code.](//github.com/marketplace/actions/deploy-to-firebase-hosting)\n\n- The \"Deploy to Firebase Hosting\" GitHub Action allows for further\n configuration, like customizing the expiry date for a preview channel or\n setting a non-live channel to deploy to when a PR is merged.\n [Learn about the available configuration options.](//github.com/marketplace/actions/deploy-to-firebase-hosting#options)\n\n- Learn more about\n [GitHub Actions](//docs.github.com/en/free-pro-team@latest/actions),\n in general."]]