Skip to content

Commit 6e59314

Browse files
committed
[Workers] Align Preview URL and Version URL terminology outside Previews docs
1 parent e363093 commit 6e59314

8 files changed

Lines changed: 20 additions & 17 deletions

File tree

src/content/docs/workers/ci-cd/builds/build-branches.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar:
66
order: 6
77
---
88

9-
When you connect a git repository to Workers, commits made on the production git branch will produce a Workers Build. If you want to take advantage of [preview URLs](/workers/previews/) and [pull request comments](/workers/ci-cd/builds/git-integration/github-integration/#pull-request-comment), you can additionally enable "non-production branch builds" in order to trigger a build on all branches of your repository.
9+
When you connect a git repository to Workers, commits made on the production git branch will produce a Workers Build. If you want to take advantage of [Preview URLs](/workers/previews/) and [pull request comments](/workers/ci-cd/builds/git-integration/github-integration/#pull-request-comment), you can additionally enable "non-production branch builds" in order to trigger a build on all branches of your repository.
1010

1111
## Change production branch
1212

src/content/docs/workers/ci-cd/builds/configuration.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ Examples of other deploy commands you can set include:
5151

5252
The non-production branch deploy command is only applicable when you have enabled [non-production branch builds](/workers/ci-cd/builds/build-branches/#configure-non-production-branch-builds).
5353

54-
It defaults to `npx wrangler versions upload`, producing a [preview URL](/workers/previews/). Like the build and deploy commands, it can be customized to instead run anything.
54+
It defaults to `npx wrangler preview`, producing a [Preview URL](/workers/previews/). Like the build and deploy commands, it can be customized to instead run anything.
5555

5656
Examples of other non-production branch deploy commands you can set include:
5757

58-
| Example Command | Description |
59-
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60-
| `yarn exec wrangler versions upload` | You can customize the package manager used to run Wrangler. |
61-
| `npx wrangler versions upload --env staging` | If you have a [Wrangler environment](/workers/ci-cd/builds/advanced-setups/#wrangler-environments) Worker, you should set your non-production branch deploy command with the environment flag. For more details, see [Advanced Setups](/workers/ci-cd/builds/advanced-setups/#wrangler-environments). |
58+
| Example Command | Description |
59+
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
60+
| `yarn exec wrangler preview` | You can customize the package manager used to run Wrangler. |
61+
| `npx wrangler preview --env staging` | If you have a [Wrangler environment](/workers/ci-cd/builds/advanced-setups/#wrangler-environments) Worker, you should set your non-production branch deploy command with the environment flag. For more details, see [Advanced Setups](/workers/ci-cd/builds/advanced-setups/#wrangler-environments). |
6262

6363
### API token
6464

src/content/docs/workers/ci-cd/builds/git-integration/github-integration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If a commit is on a pull request, Cloudflare will automatically post a comment o
1818

1919
![GitHub pull request comment](~/assets/images/workers/platform/ci-cd/github-pull-request-comment.png)
2020

21-
A [preview URL](/workers/previews/) will be provided for any builds which perform `wrangler versions upload`. This is particularly useful when reviewing your pull request, as it allows you to compare the code changes alongside an updated version of your Worker.
21+
A [Preview URL](/workers/previews/) will be provided for any builds which perform `wrangler preview`. This is particularly useful when reviewing your pull request, as it allows you to compare the code changes against an isolated copy of your Worker.
2222

2323
Comment history reveals any builds completed earlier while the PR was open.
2424

src/content/docs/workers/ci-cd/builds/git-integration/gitlab-integration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If a commit is on a merge request, Cloudflare will automatically post a comment
1818

1919
![GitLab merge request comment](~/assets/images/workers/platform/ci-cd/gitlab-pull-request-comment.png)
2020

21-
A [preview URL](/workers/previews/) will be provided for any builds which perform `wrangler versions upload`. This is particularly useful when reviewing your pull request, as it allows you to compare the code changes alongside an updated version of your Worker.
21+
A [Preview URL](/workers/previews/) will be provided for any builds which perform `wrangler preview`. This is particularly useful when reviewing your pull request, as it allows you to compare the code changes against an isolated copy of your Worker.
2222

2323
:::note[Enabling GitLab Merge Request events for existing connections]
2424
New GitLab connections are automatically configured to receive merge request events, which enable commenting functionality. For existing connections, you'll need to manually enable `Merge request events` in the Webhooks tab of your project's settings. You can follow GitLab's documentation for guidance on [managing webhooks](https://docs.gitlab.com/user/project/integrations/webhooks/#manage-webhooks).

src/content/docs/workers/ci-cd/builds/index.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,18 @@ When connecting a repository to a Workers project, the Worker name in the Cloudf
4343

4444
:::
4545

46-
## View build and preview URL
46+
## View build output
4747

4848
You can monitor a build's status and its build logs by navigating to **View build history** at the bottom of the **Deployments** tab of your Worker.
4949

50-
If the build is successful, you can view the build details by selecting **View build** in the associated new [version](/workers/configuration/versions-and-deployments/) created under Version History. There you will also find the [preview URL](/workers/previews/) generated by the version under Version ID.
50+
A successful build produces different output depending on the branch:
5151

52-
:::note[Builds, versions, deployments]
52+
- **Production branch builds** create a new [version](/workers/configuration/versions-and-deployments/) under Version History. You can view the build details by selecting **View build** on that version, along with its Version URL.
53+
- **Non-production branch builds** create a new [Preview](/workers/previews/) or deployment under an existing Preview. The [Preview URL](/workers/previews/) is posted as a comment on the associated pull request and can also be found in the **Previews** section of your Worker.
5354

54-
If a build succeeds, it is uploaded as a version. If the build is configured to deploy (for example, with `wrangler deploy` set as the deploy command), the uploaded version will be automatically promoted to the Active Deployment.
55+
:::note[Builds, versions, deployments, Previews]
56+
57+
A build on your production branch uploads a new version. If the build is configured to deploy (for example, with `wrangler deploy` set as the deploy command), that version is automatically promoted to the Active Deployment. A build on a non-production branch creates a Preview instead — Previews do not produce versions or active deployments.
5558

5659
:::
5760

src/content/docs/workers/configuration/routing/workers-dev.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ All Workers are assigned a `workers.dev` route when they are created or renamed
2323

2424
## Manage access to `workers.dev`
2525

26-
When enabled, your `workers.dev` URL is available publicly. You can use [Cloudflare Access](/cloudflare-one/access-controls/policies/) to require visitors to authenticate before accessing preview URLs. You can limit access to yourself, your teammates, your organization, or anyone else you specify in your [access policy](/cloudflare-one/access-controls/policies/).
26+
When enabled, your `workers.dev` URL is available publicly. You can use [Cloudflare Access](/cloudflare-one/access-controls/policies/) to require visitors to authenticate before accessing [Preview URLs](/workers/previews/) and Version URLs. You can limit access to yourself, your teammates, your organization, or anyone else you specify in your [access policy](/cloudflare-one/access-controls/policies/).
2727

2828
To limit your `workers.dev` URL to authorized emails only:
2929

@@ -66,7 +66,7 @@ To disable the `workers.dev` route for a Worker, include the following in your W
6666

6767
</WranglerConfig>
6868

69-
When you redeploy your Worker with this change, the `workers.dev` route will be disabled. Disabling your `workers.dev` route does not disable Preview URLs. Learn how to [disable Preview URLs](/workers/previews/#enable-or-disable-preview-urls).
69+
When you redeploy your Worker with this change, the `workers.dev` route will be disabled. Disabling your `workers.dev` route does not disable [Preview URLs](/workers/previews/) or Version URLs.
7070

7171
If you do not specify `workers_dev = false` but add a [`routes` component](/workers/wrangler/configuration/#routes) to your [Wrangler configuration file](/workers/wrangler/configuration/), the value of `workers_dev` will be inferred as `false` on the next deploy.
7272

src/content/docs/workers/static-assets/migration-guides/migrate-from-pages.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Pages automatically creates a preview environment for each project, and can be i
321321

322322
To get a similar experience in Workers, you must:
323323

324-
1. Ensure [preview URLs](/workers/previews/) are enabled (they are on by default).
324+
1. Ensure [Preview URLs](/workers/previews/) are enabled (they are on by default).
325325

326326
<WranglerConfig>
327327

@@ -341,7 +341,7 @@ To get a similar experience in Workers, you must:
341341

342342
1. [Enable non-production branch builds](/workers/ci-cd/builds/build-branches/#configure-non-production-branch-builds) in Workers Builds.
343343

344-
Optionally, you can also [protect these preview URLs with Cloudflare Access](/workers/previews/#manage-access-to-preview-urls).
344+
Optionally, you can also [protect these Preview URLs with Cloudflare Access](/workers/previews/).
345345

346346
:::note
347347

src/content/docs/workers/wrangler/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ The `main` key is optional for assets-only Workers.
171171
- Enables use of `*.workers.dev` subdomain to deploy your Worker. If you have a Worker that is only for `scheduled` events, you can set this to `false`. Defaults to `true`. Refer to [types of routes](#types-of-routes).
172172

173173
- `preview_urls` <Type text="boolean" /> <MetaInfo text="optional" />
174-
- Enables use of Preview URLs to test your Worker. Defaults to value of `workers_dev`. Refer to [Preview URLs](/workers/previews/).
174+
- Enables use of [Preview URLs](/workers/previews/) and Version URLs to test your Worker. Defaults to value of `workers_dev`.
175175

176176
- `route` <Type text="Route" /> <MetaInfo text="optional" />
177177
- A route that your Worker should be deployed to. Only one of `routes` or `route` is required. Refer to [types of routes](#types-of-routes).

0 commit comments

Comments
 (0)