generated from ecomplus/storefront-starter
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: updating with https://github.com/ecomplus/storefront-starter […
…skip ci]
- Loading branch information
Showing
16 changed files
with
7,084 additions
and
1,230 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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,17 @@ | ||
## Deploy Storefront to Firebase | ||
|
||
Pre-rendered views and assets to [Firebase Hosting](https://firebase.google.com/docs/hosting?hl=pt-br), non-pre-rendered views SSRed with [Cloud Functions](https://firebase.google.com/docs/functions) and cached (acting like ISG). | ||
|
||
### Getting started | ||
|
||
1. [Create a service account](https://console.cloud.google.com/iam-admin/serviceaccounts) for your Firebase project directly on Google Cloud Platform; | ||
2. Generate and download a JSON key for the created account; | ||
3. Add a _secret_ to your GitHub repository with name `GCP_ACCOUNT_KEY` and paste the key JSON; | ||
|
||
#### Prepare CI files | ||
|
||
4. Copy new build and deploy GitHub Actions workflow from `.github/workflows/.firebase/build-and-deploy.yml` to `.github/workflows/build-and-deploy.yml`; | ||
|
||
```bash | ||
mv ./.github/workflows/.firebase/build-and-deploy.yml ./.github/workflows/build-and-deploy.yml | ||
``` |
This file contains 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,7 @@ | ||
const functions = require('firebase-functions') | ||
|
||
const { ssr } = require('@ecomplus/storefront-renderer/functions/') | ||
|
||
process.env.STOREFRONT_LONG_CACHE = 'true' | ||
|
||
exports.ssr = functions.https.onRequest((req, res) => ssr(req, res)) |
Oops, something went wrong.