Skip to content

Commit

Permalink
chore(deploy-preview): change target of deploy-content-preview to `…
Browse files Browse the repository at this point in the history
…owid-staging`

This makes it harder to screw something up somehow and deploy a preview site to prod.
  • Loading branch information
marcelgerber committed Apr 4, 2024
1 parent 088f05f commit 3ff192a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ops/buildkite/deploy-content-preview
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
# USAGE
#
# - $ yarn deploy-content-preview (default, deploys to
# https://[YOUR_CURRENT_GIT_BRANCH].owid.pages.dev)
# https://[YOUR_CURRENT_GIT_BRANCH].owid-staging.pages.dev)
# - $ PREVIEW_BRANCH=[PREVIEW_BRANCH] yarn deploy-content-preview (deploys to
# https://[PREVIEW_BRANCH].owid.pages.dev)
# https://[PREVIEW_BRANCH].owid-staging.pages.dev)
#
# This script is meant to be run manually and locally. It is not triggered
# automatically and run by an Buildkite agent, unlike its production
Expand All @@ -21,7 +21,7 @@
#
# By default, running `yarn deploy-content-preview` will deploy to a preview
# URL prefixed with the current git branch name. For example, if you're on the
# `donate` branch, the preview URL will be https://donate.owid.pages.dev. This
# `donate` branch, the preview URL will be https://donate.owid-staging.pages.dev. This
# is mimicking the default Cloudflare Pages preview environment behavior, when
# production and preview deploys are triggered by a git push (as a side note,
# our setup doesn't use this git integration, and rather deploys manually
Expand All @@ -30,7 +30,7 @@
# Alternatively, you can pass a custom branch name to this script. This is
# useful for maintaining a stable review URL across time for a complex feature
# spread across multiple stacked PRs. For example, if you want to deploy to
# https://donate.owid.pages.dev, while on the `donate-2` branch you can run:
# https://donate.owid-staging.pages.dev, while on the `donate-2` branch you can run:
#
# PREVIEW_BRANCH=donate yarn deploy-content-preview
#
Expand All @@ -52,11 +52,11 @@
# http://staging-site-donate).
#
# Before running this script, you need to rebake the content using the target
# preview BAKED_BASE_URL (e.g. https://donate.owid.pages.dev) to avoid CORS
# preview BAKED_BASE_URL (e.g. https://donate.owid-staging.pages.dev) to avoid CORS
# issues. This is done by running the following sequence on the staging server
# (not locally):
# - in ~/owid-grapher/.env, set BAKED_BASE_URL to
# https://[PREVIEW_BRANCH].owid.pages.dev
# https://[PREVIEW_BRANCH].owid-staging.pages.dev
# - `rm ~/.site-baked` (see ops > templates > lxc-manager > grapher-refresh)
# - locate the latest Buildkite job for your staging environment and click
# "Rebuild". This will run the full site baking sequence with the preview URL
Expand Down Expand Up @@ -105,7 +105,7 @@ as_owid() {
}

# Cloudflare Pages settings
PROJECT_NAME=owid
PROJECT_NAME=owid-staging

# Set PREVIEW_BRANCH to the current git branch name if not set
PREVIEW_BRANCH=${PREVIEW_BRANCH:-$GIT_BRANCH}
Expand Down

0 comments on commit 3ff192a

Please sign in to comment.