forked from rerun-io/rerun
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### What Right now the workflow for updating docs on `rerun.io` is: 1. Push your changes to some branch in this repository 2. Get the hash of your latest commit 3. Login to our project on Vercel 4. Manually update the `RELEASE_COMMIT` env var 5. Trigger a redeploy of the latest production deployment After this PR, the new workflow will be: 1. Cherry-pick any docs commits to the `docs-latest` branch `rerun.io` now always fetches docs from the `docs-latest` branch, instead of a specific commit hash. Any push to `docs-latest` will trigger a redeploy of the website. The release workflow has been updated to no longer deploy the website, and instead only update the `RELEASE_VERSION` env var. This PR also contains a refactor of the `deploy-vercel` action, removing some code duplication and simplifying its usage locally through `manual.mjs`. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/5988?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/5988?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/5988) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`.
- Loading branch information
Showing
18 changed files
with
450 additions
and
399 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,36 @@ | ||
// @ts-check | ||
|
||
import { setOutput } from "../util.mjs"; | ||
import { Client } from "../vercel.mjs"; | ||
|
||
/** | ||
* | ||
* @param {Client} client | ||
* @param {{ | ||
* team: string; | ||
* project: string; | ||
* commit: string | null; | ||
* version: string | null; | ||
* }} options | ||
*/ | ||
export async function deployToPreview(client, options) { | ||
const project = await client.project(options.team, options.project); | ||
const deployment = await project.latestProductionDeployment(); | ||
|
||
let line = `Deploying preview`; | ||
if (options.commit) line += ` RELEASE_COMMIT=${options.commit}`; | ||
if (options.version) line += ` RELEASE_VERSION=${options.version}`; | ||
console.log(line); | ||
|
||
const env = { IS_PR_PREVIEW: "true" }; | ||
if (options.commit) env["RELEASE_COMMIT"] = options.commit; | ||
if (options.version) env["RELEASE_VERSION"] = options.version; | ||
|
||
const { url } = await project.deployPreviewFrom( | ||
deployment.uid, | ||
"landing-preview", | ||
env, | ||
); | ||
|
||
setOutput("vercel_preview_url", url); | ||
} |
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,23 @@ | ||
// @ts-check | ||
|
||
import { Client } from "../vercel.mjs"; | ||
|
||
/** | ||
* | ||
* @param {Client} client | ||
* @param {{ | ||
* team: string; | ||
* project: string; | ||
* commit: string | null; | ||
* version: string | null; | ||
* }} options | ||
*/ | ||
export async function deployToProduction(client, options) { | ||
const project = await client.project(options.team, options.project); | ||
const deployment = await project.latestProductionDeployment(); | ||
|
||
if (options.commit) await project.setEnv("RELEASE_COMMIT", options.commit); | ||
if (options.version) await project.setEnv("RELEASE_VERSION", options.version); | ||
|
||
await project.redeploy(deployment.uid, "landing"); | ||
} |
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,20 @@ | ||
// @ts-check | ||
|
||
import { Client } from "../vercel.mjs"; | ||
|
||
/** | ||
* | ||
* @param {Client} client | ||
* @param {{ | ||
* team: string; | ||
* project: string; | ||
* commit: string | null; | ||
* version: string | null; | ||
* }} options | ||
*/ | ||
export async function updateProjectEnv(client, options) { | ||
const project = await client.project(options.team, options.project); | ||
|
||
if (options.commit) await project.setEnv("RELEASE_COMMIT", options.commit); | ||
if (options.version) await project.setEnv("RELEASE_VERSION", options.version); | ||
} |
Oops, something went wrong.