From 0bfa2f81888450b1a25048252c8a0f303d44247d Mon Sep 17 00:00:00 2001 From: Obinna Ekwuno Date: Tue, 5 Jul 2022 13:23:55 +0400 Subject: [PATCH 1/4] Add Cloudflare Pages to deploy options --- docs/guide/static-deploy.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index e3f5731aaae5a6..b70d30a8948c90 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -187,6 +187,29 @@ The Netlify CLI will share with you a preview URL to inspect. When you are ready $ ntl deploy --prod ``` +## Cloudflare Pages + +1. Install [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/get-started/) +2. Authenticate Wrangler with your Cloudflare account using `wrangler login` +3. Run your build command +4. Deploy using `npx wrangler pages publish ` + +```bash +# Install Wrangler CLI +$ npm install -g wrangler + +# Login to Cloudflare account from CLI +$ wrangler login + +# Run your build command +$ npm run build + +# Create new deployment +$ npx wrangler pages publish + +``` +After your assets are uploaded Wrangler will give you a preview URL to inspect your site and when you log into the Cloudflare Pages dashboard you will see you new Project. + ## Google Firebase 1. Make sure you have [firebase-tools](https://www.npmjs.com/package/firebase-tools) installed. From 6032b20be140222a38e74859294d7a9d9e61b662 Mon Sep 17 00:00:00 2001 From: Obinna Ekwuno Date: Tue, 5 Jul 2022 17:28:50 +0100 Subject: [PATCH 2/4] Apply suggestions from code review Co-authored-by: Bjorn Lu --- docs/guide/static-deploy.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index b70d30a8948c90..2a321a14c70957 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -189,10 +189,10 @@ $ ntl deploy --prod ## Cloudflare Pages -1. Install [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/get-started/) -2. Authenticate Wrangler with your Cloudflare account using `wrangler login` -3. Run your build command -4. Deploy using `npx wrangler pages publish ` +1. Install [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/get-started/). +2. Authenticate Wrangler with your Cloudflare account using `wrangler login`. +3. Run your build command. +4. Deploy using `npx wrangler pages publish dist`. ```bash # Install Wrangler CLI @@ -202,13 +202,13 @@ $ npm install -g wrangler $ wrangler login # Run your build command -$ npm run build +$ npm run build # Create new deployment -$ npx wrangler pages publish +$ npx wrangler pages publish dist ``` -After your assets are uploaded Wrangler will give you a preview URL to inspect your site and when you log into the Cloudflare Pages dashboard you will see you new Project. +After your assets are uploaded, Wrangler will give you a preview URL to inspect your site. When you log into the Cloudflare Pages dashboard, you will see your new project. ## Google Firebase From d7abfb088fca85674acd94cbecd8ffd1bf662630 Mon Sep 17 00:00:00 2001 From: Ekwuno Date: Tue, 5 Jul 2022 18:48:31 +0100 Subject: [PATCH 3/4] fix: format pr (for #8927) --- docs/guide/static-deploy.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index 2a321a14c70957..68bd4510321290 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -201,14 +201,15 @@ $ npm install -g wrangler # Login to Cloudflare account from CLI $ wrangler login -# Run your build command +# Run your build command $ npm run build # Create new deployment $ npx wrangler pages publish dist ``` -After your assets are uploaded, Wrangler will give you a preview URL to inspect your site. When you log into the Cloudflare Pages dashboard, you will see your new project. + +After your assets are uploaded, Wrangler will give you a preview URL to inspect your site. When you log into the Cloudflare Pages dashboard, you will see your new project. ## Google Firebase From b37cd8fa7bb9d2743d5c50a4ef36cd9230d095c6 Mon Sep 17 00:00:00 2001 From: Obinna Ekwuno Date: Tue, 5 Jul 2022 20:10:58 +0100 Subject: [PATCH 4/4] Update docs/guide/static-deploy.md Co-authored-by: Tony Trinh --- docs/guide/static-deploy.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/guide/static-deploy.md b/docs/guide/static-deploy.md index 68bd4510321290..4fd597a984ae15 100644 --- a/docs/guide/static-deploy.md +++ b/docs/guide/static-deploy.md @@ -206,7 +206,6 @@ $ npm run build # Create new deployment $ npx wrangler pages publish dist - ``` After your assets are uploaded, Wrangler will give you a preview URL to inspect your site. When you log into the Cloudflare Pages dashboard, you will see your new project.