From 4ad021b3b308a7fccb133c36711aab9334bd685f Mon Sep 17 00:00:00 2001 From: Brandon Hubbard Date: Tue, 17 Nov 2020 22:28:12 -0800 Subject: [PATCH] Show example with Deploy to CloudFlare Worker --- docs/guide/deploy.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docs/guide/deploy.md b/docs/guide/deploy.md index 8fd213354..8c870067a 100644 --- a/docs/guide/deploy.md +++ b/docs/guide/deploy.md @@ -116,6 +116,24 @@ pages: Visit the [GitLab Pages](https://gitlab.com/help/user/project/pages/getting_started_part_one.md) to find out about advanced configurations. +## CloudFlare Workers + +1. To start, install [CloudFlare Wrangler CLI](https://developers.cloudflare.com/workers/cli-wrangler) + +2. Create `wrangler.toml` at the root of your project with the following content: + +``` +name = "status" +type = "webpack" +account_id = "YOUR CLOUDFLARE ACCOUNT ID" +workers_dev = true + +[site] +bucket = "dist" +``` + +3. Run `wrangler publish` + ### References - [Gatsby: Deploying to GitLab Pages](https://www.gatsbyjs.org/docs/deploying-to-gitlab-pages/)