mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Merge commit '35dec7c96f7ee3eb17dd444f7067f0c776fb56ae'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Host on Firebase
|
||||
description: You can use Firebase's free tier to host your static website; this also gives you access to Firebase's NOSQL API.
|
||||
description: You can use Firebase's free tier to host your static website; this also gives you access to Firebase's NoSQL API.
|
||||
categories: [hosting and deployment]
|
||||
keywords: [hosting,firebase]
|
||||
menu:
|
||||
@@ -18,20 +18,19 @@ toc: true
|
||||
|
||||
Go to the [Firebase console][console] and create a new project (unless you already have a project). You will need to globally install `firebase-tools` (node.js):
|
||||
|
||||
```txt
|
||||
```sh
|
||||
npm install -g firebase-tools
|
||||
```
|
||||
|
||||
Log in to Firebase (setup on your local machine) using `firebase login`, which opens a browser where you can select your account. Use `firebase logout` in case you are already logged in but to the wrong account.
|
||||
|
||||
|
||||
```txt
|
||||
```sh
|
||||
firebase login
|
||||
```
|
||||
|
||||
In the root of your Hugo project, initialize the Firebase project with the `firebase init` command:
|
||||
|
||||
```txt
|
||||
```sh
|
||||
firebase init
|
||||
```
|
||||
|
||||
@@ -78,7 +77,7 @@ Don't forget to update your static pages before push!
|
||||
|
||||
To deploy your Hugo site, execute the `firebase deploy` command, and your site will be up in no time:
|
||||
|
||||
```txt
|
||||
```sh
|
||||
hugo && firebase deploy
|
||||
```
|
||||
|
||||
@@ -86,7 +85,7 @@ hugo && firebase deploy
|
||||
|
||||
You can generate a deploy token using
|
||||
|
||||
```txt
|
||||
```sh
|
||||
firebase login:ci
|
||||
```
|
||||
|
||||
@@ -98,7 +97,7 @@ This is a private secret and it should not appear in a public repository. Make s
|
||||
|
||||
You can then add a step in your build to do the deployment using the token:
|
||||
|
||||
```txt
|
||||
```sh
|
||||
firebase deploy --token $FIREBASE_DEPLOY_TOKEN
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user