An app that deploys itself says so, instead of "Deployed elsewhere". A project whose own workflows (or another pipeline) deploy it, as g1t's do, read as if g1t had nothing to do with it: grey "Deployed elsewhere" in the workspace's Projects, "App, deployed elsewhere" on its badge, and the API said `runs` is `g1t` "when g1t deploys it". What tells the two apart is who hosts it, so they are now named that way: App or site, hosted on g1t.page (badge App on g1t.page) and App or site that deploys itself (badge App, deploys itself), in settings, the badge's menu, the overview's "Where does it run?" (It deploys itself), the Deployments pages, the guides and the API's descriptions; `runs` keeps its values. In Projects an app that deploys itself shows the rocket, Deploys itself, and the Deploys filter counts it. Its production card says which workflow run deployed it when g1t Actions did ("deployed 16m ago by its workflow"), else "by its own pipeline". An app nobody has placed that deploys production itself (a successful production deployment from a workflow or the API, not g1t.page's) now deploys itself everywhere, where before only its overview inferred it: the projects service keeps that it has (migration 0013, `reports_production`), and Deployments being on or a setting still win. Checked: the site's typecheck (tsc -b --force), its 911 tests and a production build; the projects service's typecheck and 49 tests (new: an app that deploys production itself); the API's openapi tests with the docs copy regenerated; the deploy tool's 92 tests.
21 files+77−605 files not counted0/21 viewed
| 1745 | 1745 | Op::GetContents => crate::contents::description(), | |
| 1746 | 1746 | Op::ListCommits => crate::commits::description(), | |
| 1747 | 1747 | Op::ListProjects => { | |
| 1748 | − | "A workspace's projects that you can see, by name. A project is what a workspace builds and runs, from a repository or a root directory in one; every repository has a project of its own name. Each has what it is (`kind`: app, library, tool, docs or other) and why (`kind_reason`), where it runs (`runs`: `g1t` when g1t deploys it, `elsewhere` when it is deployed by other means, at `production_url`), and its `links`." | |
| 1748 | + | "A workspace's projects that you can see, by name. A project is what a workspace builds and runs, from a repository or a root directory in one; every repository has a project of its own name. Each has what it is (`kind`: app, library, tool, docs or other) and why (`kind_reason`), where it runs (`runs`: `g1t` when it is hosted on g1t.page, `elsewhere` when it deploys itself to hosting of its own, with a workflow on g1t Actions or another pipeline, at `production_url`), and its `links`." | |
| 1749 | 1749 | } | |
| 1750 | 1750 | Op::GetProject => { | |
| 1751 | 1751 | "A project: what it is (`kind`, and `kind_reason` saying why), where it runs (`runs` and `production_url`), what you set and what detection decides (`setting` and `detected`), its repository and `root_dir`, and its homepage, docs and other `links`. A private repository's project is found only by those who can see the repository." | |
| ⋯ | |||
| 3050 | 3050 | "runs": { | |
| 3051 | 3051 | "type": "string", | |
| 3052 | 3052 | "enum": ["auto", "g1t", "elsewhere"], | |
| 3053 | − | "description": "Where it runs: g1t when g1t deploys it, elsewhere when it is deployed by other means. auto leaves it to Deployments.", | |
| 3053 | + | "description": "Where it runs: g1t when it is hosted on g1t.page, elsewhere when it deploys itself (a workflow on g1t Actions, or another pipeline) to hosting of its own. auto leaves it to Deployments, and to whether it has deployed production itself.", | |
| 3054 | 3054 | }, | |
| 3055 | − | "production_url": { "type": ["string", "null"], "description": "Production's address when it runs elsewhere. null or \"\" clears it." }, | |
| 3055 | + | "production_url": { "type": ["string", "null"], "description": "Production's address when it deploys itself. null or \"\" clears it." }, | |
| 3056 | 3056 | "homepage": { "type": ["string", "null"], "description": "Its homepage. null or \"\" follows its repository's website again." }, | |
| 3057 | 3057 | "docs_url": { "type": ["string", "null"], "description": "Where its documentation is read. null or \"\" clears it." }, | |
| 3058 | 3058 | "links": { | |
| 7191 | 7191 | "kind": "app", | |
| 7192 | 7192 | "kind_reason": { | |
| 7193 | 7193 | "by": "set", | |
| 7194 | − | "detail": "Set to an app that runs elsewhere." | |
| 7194 | + | "detail": "Set in its settings: it deploys itself." | |
| 7195 | 7195 | }, | |
| 7196 | 7196 | "runs": "elsewhere", | |
| 7197 | 7197 | "production_url": "https://g1t.sh", | |
| ⋯ | |||
| 7290 | 7290 | "kind": "app", | |
| 7291 | 7291 | "kind_reason": { | |
| 7292 | 7292 | "by": "set", | |
| 7293 | − | "detail": "Set to an app that runs elsewhere." | |
| 7293 | + | "detail": "Set in its settings: it deploys itself." | |
| 7294 | 7294 | }, | |
| 7295 | 7295 | "runs": "elsewhere", | |
| 7296 | 7296 | "production_url": "https://g1t.sh", | |
| ⋯ | |||
| 7357 | 7357 | "kind": "app", | |
| 7358 | 7358 | "kind_reason": { | |
| 7359 | 7359 | "by": "set", | |
| 7360 | − | "detail": "Set to an app that runs elsewhere." | |
| 7360 | + | "detail": "Set in its settings: it deploys itself." | |
| 7361 | 7361 | }, | |
| 7362 | 7362 | "runs": "elsewhere", | |
| 7363 | 7363 | "production_url": "https://g1t.sh", | |
| 27 | 27 | | **Branches** | Beside each branch's latest commit | | |
| 28 | 28 | | **Tags** | Beside each tagged commit | | |
| 29 | 29 | | A pull request | Beside its head commit, in the sidebar; its merge box lists them too | | |
| 30 | − | | A project's overview | For an app deployed elsewhere that has reported no deployment, beside the latest commit in its production card | | |
| 30 | + | | A project's overview | For an app that deploys itself and has reported no deployment, beside the latest commit in its production card | | |
| 31 | 31 | ||
| 32 | 32 | A page reads the checks of all its commits at once, after the page itself | |
| 33 | 33 | has loaded: each mark shows a placeholder until they arrive. |
| 78 | 78 | Production starts building at once from the default branch. Every pull | |
| 79 | 79 | request opened or pushed to from then on gets a preview. | |
| 80 | 80 | ||
| 81 | − | Deployments are for projects g1t runs. Not every project is one: a | |
| 81 | + | Deployments are for projects g1t.page hosts. Not every project is one: a | |
| 82 | 82 | library, a tool or documentation is published rather than deployed, and | |
| 83 | − | an app may be deployed by its own pipeline somewhere else. Only a project | |
| 84 | − | that is [an app or site deployed on g1t](/guides/projects/#what-a-project-is) | |
| 83 | + | an app may deploy itself, with [a workflow](#deploying-from-a-workflow) | |
| 84 | + | or another pipeline, to hosting of its own. Only a project that is | |
| 85 | + | [an app or site hosted on g1t.page](/guides/projects/#what-a-project-is) | |
| 85 | 86 | is asked to turn deployments on. Any other project's **Deployments** page | |
| 86 | − | still turns them on; doing so makes it an app deployed on g1t, including | |
| 87 | − | one that was deployed elsewhere. A project set to be a library, a tool or | |
| 87 | + | still turns them on; doing so makes it an app hosted on g1t.page, | |
| 88 | + | including one that deployed itself. A project set to be a library, a tool or | |
| 88 | 89 | something else cannot have deployments turned on until that setting | |
| 89 | 90 | changes. | |
| 90 | 91 | ||
| ⋯ | |||
| 423 | 424 | uploaded image shows instead. | |
| 424 | 425 | - Screenshots are not charged. | |
| 425 | 426 | ||
| 426 | − | An app deployed elsewhere gets a screenshot of its production address | |
| 427 | + | An app that deploys itself gets a screenshot of its production address | |
| 427 | 428 | too, and any project can show an uploaded image instead. See | |
| 428 | 429 | [production's picture](/guides/projects/#productions-picture). | |
| 429 | 430 | ||
| 59 | 59 | ||
| 60 | 60 | | Part | What it shows | | |
| 61 | 61 | | --- | --- | | |
| 62 | − | | **What it is** | A badge, such as **App, deployed elsewhere** or **Library**, beside its homepage and docs. People who can change its settings open the badge to change [what it is](#what-a-project-is) in one click. | | |
| 63 | − | | **Production** | [Production's picture](#productions-picture), which opens the live site, beside the rest. For an app [deployed on g1t](/guides/deployments/): its address, the commit it runs and when it went up; **Visit** and **Redeploy**. For an app deployed elsewhere: production's address and **Visit**, with its latest reported production deployment or the default branch's latest commit. For an app nobody has placed yet: one question, where it runs. | | |
| 62 | + | | **What it is** | A badge, such as **App, deploys itself** or **Library**, beside its homepage and docs. People who can change its settings open the badge to change [what it is](#what-a-project-is) in one click. | | |
| 63 | + | | **Production** | [Production's picture](#productions-picture), which opens the live site, beside the rest. For an app [hosted on g1t.page](/guides/deployments/): its address, the commit it runs and when it went up; **Visit** and **Redeploy**. For an app that deploys itself: production's address and **Visit**, with its latest reported production deployment (and the workflow run that made it, when g1t Actions did) or the default branch's latest commit. For an app nobody has placed yet: one question, where it runs. | | |
| 64 | 64 | | **Packages** | For a library or a tool, in place of Production: the packages its repository publishes, each with its latest version and how to install it, or how to publish a first one. | | |
| 65 | 65 | | **Documentation**, **Homepage** | For docs, where they are read; for anything else, its homepage. | | |
| 66 | 66 | | **Facts** | Under production: its latest release (or, where the card does not already say it, production's state), how often checks pass, and either how many changes pass on the first try and what is open, or, for people with a role when [Observability](/guides/observability/) has data, requests and the error rate over the last day with how many errors are open. | | |
| ⋯ | |||
| 78 | 78 | The production card always has a picture of the app, wherever it runs. | |
| 79 | 79 | It is the first of these there is: | |
| 80 | 80 | ||
| 81 | − | 1. **A screenshot of production.** For an app deployed on g1t, g1t takes | |
| 81 | + | 1. **A screenshot of production.** For an app hosted on g1t.page, g1t takes | |
| 82 | 82 | one each time production goes live (see | |
| 83 | 83 | [the production screenshot](/guides/deployments/#the-production-screenshot)); | |
| 84 | 84 | people with a role on the repository see it, like the rest of its | |
| 85 | − | deployments. For an app deployed elsewhere, g1t takes one of | |
| 85 | + | deployments. For an app that deploys itself, g1t takes one of | |
| 86 | 86 | production's address: the address its latest production deployment | |
| 87 | 87 | reported to g1t gives, or else the one set for it under **What it is**. | |
| 88 | 88 | Anyone who can see the project sees it. | |
| ⋯ | |||
| 92 | 92 | the project's settings see **Add an image of your app** on it, which | |
| 93 | 93 | opens **Production image**. | |
| 94 | 94 | ||
| 95 | − | A screenshot of production deployed elsewhere is taken: | |
| 95 | + | A screenshot of an app that deploys itself is taken: | |
| 96 | 96 | ||
| 97 | 97 | - when its address is set or changed; | |
| 98 | 98 | - when a production deployment of it is reported to g1t and succeeds, | |
| ⋯ | |||
| 123 | 123 | first one, when one cannot be taken, or for an app with no production | |
| 124 | 124 | address. | |
| 125 | 125 | - **Use the uploaded image instead of a screenshot** shows it in place of | |
| 126 | − | any screenshot. While it is on, g1t takes no screenshots of production | |
| 127 | − | deployed elsewhere. | |
| 126 | + | any screenshot. While it is on, g1t takes no screenshots of an app | |
| 127 | + | that deploys itself. | |
| 128 | 128 | - **Remove** takes it away; the card goes back to the screenshot or the | |
| 129 | 129 | frame. | |
| 130 | 130 | ||
| ⋯ | |||
| 138 | 138 | ||
| 139 | 139 | | What it is | Its overview shows | | |
| 140 | 140 | | --- | --- | | |
| 141 | − | | **App or site, deployed on g1t** | Production on g1t.page, with previews and domains. | | |
| 142 | − | | **App or site, deployed elsewhere** | Production at the address you give, deployed by your own pipeline, with **Visit**. It is never asked to turn on Deployments; Deployment settings stay one link away. | | |
| 141 | + | | **App or site, hosted on g1t.page** | g1t builds and hosts it: production on g1t.page, with previews and domains. | | |
| 142 | + | | **App or site that deploys itself** | Its own [workflows](/guides/deployments/#deploying-from-a-workflow) on g1t Actions, or another pipeline, deploy it to hosting of its own. Production at the address its deployments report or you give, with **Visit**. It is never asked to turn on Deployments; Deployment settings stay one link away. | | |
| 143 | 143 | | **Library or package** | The packages its repository publishes and how to install them. | | |
| 144 | 144 | | **Tool or CLI** | The same as a library: its packages and releases. | | |
| 145 | 145 | | **Documentation** | Where its docs are read. Docs can be published on g1t.page too, by turning on Deployments. | | |
| ⋯ | |||
| 152 | 152 | Until you say, g1t works it out for itself, in this order: | |
| 153 | 153 | ||
| 154 | 154 | 1. If [Deployments](/guides/deployments/) are on for the project, it is | |
| 155 | − | an app deployed on g1t. | |
| 155 | + | an app hosted on g1t.page. | |
| 156 | 156 | 2. If its repository publishes a package other than a container image, | |
| 157 | 157 | such as a [Composer](/guides/composer/) or [npm](/guides/npm/) | |
| 158 | 158 | package, it is a library. | |
| ⋯ | |||
| 178 | 178 | ||
| 179 | 179 | An app found this way runs on g1t only while Deployments are on. Until | |
| 180 | 180 | you say where it runs, its overview asks, in place of production: | |
| 181 | − | **Deploy on g1t**, **It's deployed elsewhere** (with production's | |
| 181 | + | **Deploy on g1t**, **It deploys itself** (with production's | |
| 182 | 182 | address), or **It isn't deployed** (a library, a tool, documentation or | |
| 183 | 183 | something else). | |
| 184 | 184 | ||
| ⋯ | |||
| 187 | 187 | From the overview, open the badge beside its name, such as **App**, and | |
| 188 | 188 | choose one. Or open **Settings**, then **General**, and under **What it | |
| 189 | 189 | is** choose **Detect automatically**, which shows what was detected and | |
| 190 | − | why, or one of the kinds above. **App or site, deployed elsewhere** asks | |
| 190 | + | why, or one of the kinds above. **App or site that deploys itself** asks | |
| 191 | 191 | for production's address. | |
| 192 | 192 | ||
| 193 | 193 | Choosing a library, a tool or something else while Deployments are on is | |
| 194 | 194 | refused: turn them off first under **Settings**, then **Deployments**; | |
| 195 | 195 | g1t does not turn them off for you. While it is set that way, Deployments | |
| 196 | − | cannot be turned on. Turning Deployments on for an app deployed elsewhere | |
| 197 | − | makes it an app deployed on g1t. | |
| 196 | + | cannot be turned on. Turning Deployments on for an app that deploys itself | |
| 197 | + | makes it an app hosted on g1t.page. | |
| 198 | 198 | ||
| 199 | 199 | Changing what it is needs the role that changes the project's settings. | |
| 200 | 200 | ||
Binary or large file; its contents are not shown.
| 134 | 134 | ||
| 135 | 135 | /** | |
| 136 | 136 | * What a project is, as a choice of one, with production's address beside | |
| 137 | − | * Deployed elsewhere. Posts `choice` and `productionUrl`. `blocked` says | |
| 137 | + | * Deploys itself. Posts `choice` and `productionUrl`. `blocked` says | |
| 138 | 138 | * why a choice that stops it deploying cannot be saved yet. | |
| 139 | 139 | */ | |
| 140 | 140 | export function KindFields({ | |
| ⋯ | |||
| 193 | 193 | ||
| 194 | 194 | /** The one-click choices the overview offers, without Detect, in order. */ | |
| 195 | 195 | const MENU: { value: KindChoice; label: string }[] = [ | |
| 196 | − | { value: "g1t", label: "Deployed on g1t" }, | |
| 197 | − | { value: "elsewhere", label: "Deployed elsewhere" }, | |
| 196 | + | { value: "g1t", label: "Hosted on g1t.page" }, | |
| 197 | + | { value: "elsewhere", label: "Deploys itself" }, | |
| 198 | 198 | { value: "library", label: "Library or package" }, | |
| 199 | 199 | { value: "tool", label: "Tool or CLI" }, | |
| 200 | 200 | { value: "docs", label: "Documentation" }, | |
| 1 | 1 | /** | |
| 2 | − | * The top of a project's overview for what g1t does not deploy: an app | |
| 3 | − | * deployed elsewhere, an app nobody has said where it runs, docs, and | |
| 2 | + | * The top of a project's overview for what g1t.page does not host: an app | |
| 3 | + | * that deploys itself, an app nobody has said where it runs, docs, and | |
| 4 | 4 | * anything else. An app on g1t keeps its production card, and a library | |
| 5 | 5 | * or a tool its packages (routes/repo/overview.tsx). | |
| 6 | 6 | */ | |
| ⋯ | |||
| 17 | 17 | import { Hint } from "./ui/hint"; | |
| 18 | 18 | ||
| 19 | 19 | /** | |
| 20 | − | * A deployment reported to g1t from outside it, such as by a pipeline that | |
| 21 | − | * deploys production itself. When there is one for production, the card | |
| 22 | − | * shows it. | |
| 20 | + | * A deployment g1t.page did not build: one a workflow's job made, or one | |
| 21 | + | * reported by another pipeline. When there is one for production, the | |
| 22 | + | * card shows it. | |
| 23 | 23 | */ | |
| 24 | 24 | export type ExternalDeployment = { | |
| 25 | 25 | environment: string; | |
| ⋯ | |||
| 28 | 28 | state: string; | |
| 29 | 29 | sha: string; | |
| 30 | 30 | created_at: string; | |
| 31 | + | /** The workflow run that made it, when g1t Actions did. */ | |
| 32 | + | run_url?: string | null; | |
| 31 | 33 | }; | |
| 32 | 34 | ||
| 33 | 35 | /** A reported deployment's state, as g1t's own deployments show theirs. */ | |
| ⋯ | |||
| 120 | 122 | } | |
| 121 | 123 | ||
| 122 | 124 | /** | |
| 123 | − | * An app deployed by its own pipeline: production at the address it was | |
| 125 | + | * An app that deploys itself (its workflows, or another pipeline): production at the address it was | |
| 124 | 126 | * given, with the latest reported deployment, or else the default branch's | |
| 125 | 127 | * latest commit and its checks. | |
| 126 | 128 | */ | |
| ⋯ | |||
| 161 | 163 | </span> | |
| 162 | 164 | <span> | |
| 163 | 165 | deployed <TimeAgo at={deployment.created_at} /> | |
| 166 | + | {deployment.run_url ? ( | |
| 167 | + | <> | |
| 168 | + | {" "} | |
| 169 | + | by{" "} | |
| 170 | + | <Link to={deployment.run_url} className="underline-offset-4 hover:text-fg hover:underline"> | |
| 171 | + | its workflow | |
| 172 | + | </Link> | |
| 173 | + | </> | |
| 174 | + | ) : ( | |
| 175 | + | " by its own pipeline" | |
| 176 | + | )} | |
| 164 | 177 | </span> | |
| 165 | 178 | </> | |
| 166 | 179 | ) : ( | |
| 167 | 180 | <> | |
| 168 | − | <span>Deployed by its own pipeline</span> | |
| 181 | + | <span>Deploys itself</span> | |
| 169 | 182 | {commit && ( | |
| 170 | 183 | <span className="inline-flex items-center gap-1.5"> | |
| 171 | 184 | <span className="text-faint">·</span> | |
| ⋯ | |||
| 185 | 198 | <> | |
| 186 | 199 | <p className="mt-2 text-lg font-medium">Where is production?</p> | |
| 187 | 200 | <p className="mt-1 max-w-lg text-sm text-muted"> | |
| 188 | − | {project.name} is deployed by its own pipeline. Give production's address, and this card links to it. | |
| 201 | + | {project.name} deploys itself. Give production's address, and this card links to it. | |
| 189 | 202 | </p> | |
| 190 | 203 | <AddressForm field="productionUrl" placeholder="https://example.com" label="Production's address" extra={{ intent: "kind", choice: "elsewhere" }} /> | |
| 191 | 204 | </> | |
| 192 | 205 | ) : ( | |
| 193 | − | <p className="mt-2 text-sm text-muted">Deployed by its own pipeline.</p> | |
| 206 | + | <p className="mt-2 text-sm text-muted">Deploys itself.</p> | |
| 194 | 207 | )} | |
| 195 | 208 | <DeployQuietly base={base} canDeploy={canDeploy} what="it" /> | |
| 196 | 209 | </div> | |
| ⋯ | |||
| 251 | 264 | variant="outline" | |
| 252 | 265 | > | |
| 253 | 266 | <Globe size={14} /> | |
| 254 | − | It's deployed elsewhere | |
| 267 | + | It deploys itself | |
| 255 | 268 | </Button> | |
| 256 | 269 | <DropdownMenu> | |
| 257 | 270 | <DropdownMenuTrigger asChild> | |
| 142 | 142 | ||
| 143 | 143 | /** | |
| 144 | 144 | * Production deployed somewhere other than g1t.page (by g1t Actions, or | |
| 145 | − | * reported through the API), as an app deployed elsewhere shows it: the | |
| 145 | + | * reported through the API), as an app that deploys itself shows it: the | |
| 146 | 146 | * production environment's latest deployment, when it is not a g1t.page | |
| 147 | − | * build. `created_at` is its latest status. | |
| 147 | + | * build. `created_at` is its latest status; `run_url` the workflow run | |
| 148 | + | * that made it, for one g1t Actions made. | |
| 148 | 149 | */ | |
| 149 | 150 | export function reportedProduction(environments: readonly DeploymentEnvironment[]): { | |
| 150 | 151 | environment: string; | |
| ⋯ | |||
| 152 | 153 | state: string; | |
| 153 | 154 | sha: string; | |
| 154 | 155 | created_at: string; | |
| 156 | + | run_url: string | null; | |
| 155 | 157 | } | null { | |
| 156 | 158 | const reported = productionEnvironment(environments); | |
| 157 | 159 | if (!reported?.latest || reported.latest.source === "g1t_page") return null; | |
| ⋯ | |||
| 161 | 163 | state: reported.latest.state, | |
| 162 | 164 | sha: reported.latest.sha, | |
| 163 | 165 | created_at: reported.latest.updated_at, | |
| 166 | + | run_url: reported.latest.source === "actions" ? reported.latest.run_url : null, | |
| 164 | 167 | }; | |
| 165 | 168 | } | |
| 166 | 169 | ||
| 69 | 69 | }); | |
| 70 | 70 | ||
| 71 | 71 | test("a project's badge says what it is and where it runs", () => { | |
| 72 | − | assert.equal(kindLabel({ kind: "app", runs: "elsewhere" }), "App, deployed elsewhere"); | |
| 73 | − | assert.equal(kindLabel({ kind: "app", runs: "g1t" }), "App on g1t"); | |
| 72 | + | assert.equal(kindLabel({ kind: "app", runs: "elsewhere" }), "App, deploys itself"); | |
| 73 | + | assert.equal(kindLabel({ kind: "app", runs: "g1t" }), "App on g1t.page"); | |
| 74 | 74 | assert.equal(kindLabel({ kind: "app", runs: null }), "App"); | |
| 75 | 75 | assert.equal(kindLabel({ kind: "tool", runs: null }), "Tool"); | |
| 76 | 76 | assert.equal(kindLabel({ kind: "other", runs: null }), "Project"); |
| 47 | 47 | /** The choices for "What it is" in a project's settings, in order. */ | |
| 48 | 48 | export const KIND_CHOICES: { value: KindChoice; label: string; hint: string }[] = [ | |
| 49 | 49 | { value: "auto", label: "Detect automatically", hint: "From whether Deployments are on, the packages it publishes and the files at its root." }, | |
| 50 | − | { value: "g1t", label: "App or site, deployed on g1t", hint: "g1t builds it: production on g1t.page from the default branch, and a preview for every pull request." }, | |
| 50 | + | { value: "g1t", label: "App or site, hosted on g1t.page", hint: "g1t builds and hosts it: production on g1t.page from the default branch, and a preview for every pull request." }, | |
| 51 | 51 | { | |
| 52 | 52 | value: "elsewhere", | |
| 53 | − | label: "App or site, deployed elsewhere", | |
| 54 | − | hint: "Your own pipeline deploys it. Its overview shows production at the address you give.", | |
| 53 | + | label: "App or site that deploys itself", | |
| 54 | + | hint: "Its own workflows on g1t Actions, or another pipeline, deploy it to your hosting. Its overview shows production at the address it reports or you give.", | |
| 55 | 55 | }, | |
| 56 | 56 | { value: "library", label: "Library or package", hint: "Installed by other code: its overview shows its packages and releases." }, | |
| 57 | 57 | { value: "tool", label: "Tool or CLI", hint: "Installed and run by people: its overview shows its releases and packages." }, | |
| ⋯ | |||
| 77 | 77 | export function kindLabel(project: Pick<Project, "kind" | "runs">): string { | |
| 78 | 78 | switch (project.kind) { | |
| 79 | 79 | case "app": | |
| 80 | − | return project.runs === "g1t" ? "App on g1t" : project.runs === "elsewhere" ? "App, deployed elsewhere" : "App"; | |
| 80 | + | return project.runs === "g1t" ? "App on g1t.page" : project.runs === "elsewhere" ? "App, deploys itself" : "App"; | |
| 81 | 81 | case "library": | |
| 82 | 82 | return "Library"; | |
| 83 | 83 | case "tool": | |
| 84 | 84 | return "Tool"; | |
| 85 | 85 | case "docs": | |
| 86 | − | return project.runs === "g1t" ? "Docs on g1t" : "Docs"; | |
| 86 | + | return project.runs === "g1t" ? "Docs on g1t.page" : "Docs"; | |
| 87 | 87 | default: | |
| 88 | 88 | return "Project"; | |
| 89 | 89 | } | |
| 61 | 61 | python: "Python", | |
| 62 | 62 | }; | |
| 63 | 63 | ||
| 64 | − | /** What the list needs of a project, with whether its Deployments are on. */ | |
| 64 | + | /** What the list needs of a project, with whether it deploys: on g1t.page, or by its own workflows. */ | |
| 65 | 65 | export type Listed = Pick< | |
| 66 | 66 | Project, | |
| 67 | 67 | "id" | "slug" | "name" | "description" | "private" | "archived" | "kind" | "ecosystem" | "updatedAt" | "pushedAt" | "activity" |
| 710 | 710 | </p> | |
| 711 | 711 | {pages.notDeploying ? ( | |
| 712 | 712 | <p className="mt-4 max-w-2xl text-sm text-muted"> | |
| 713 | − | This project is set to be something that doesn't deploy here, such as a library, a tool or an app deployed | |
| 714 | − | elsewhere. To host it on g1t.page, choose App or site, deployed on g1t, in{" "} | |
| 713 | + | This project is set to be something that doesn't deploy here, such as a library, a tool or an app that | |
| 714 | + | deploys itself. To host it on g1t.page, choose App or site, hosted on g1t.page, in{" "} | |
| 715 | 715 | <Link to={`${base}/settings#kind`} className="text-fg underline underline-offset-4"> | |
| 716 | 716 | its settings | |
| 717 | 717 | </Link>{" "} |
| 142 | 142 | {notDeploying ? ( | |
| 143 | 143 | <p className="mt-4 text-sm text-muted"> | |
| 144 | 144 | This project is set to be something that doesn't deploy, such as a library or a tool. To deploy it, choose | |
| 145 | − | App or site, deployed on g1t, under{" "} | |
| 145 | + | App or site, hosted on g1t.page, under{" "} | |
| 146 | 146 | <Link to={`${base}/settings#kind`} className="text-fg underline underline-offset-4"> | |
| 147 | 147 | General | |
| 148 | 148 | </Link>{" "} |
| 67 | 67 | description: form.get("inherit") === "description" ? null : String(form.get("description") ?? ""), | |
| 68 | 68 | rootDir: String(form.get("rootDir") ?? ""), | |
| 69 | 69 | ...(set ?? {}), | |
| 70 | − | // Production's address is asked for beside Deployed elsewhere, and kept otherwise. | |
| 70 | + | // Production's address is asked for beside Deploys itself, and kept otherwise. | |
| 71 | 71 | ...(form.has("productionUrl") ? { productionUrl: String(form.get("productionUrl")) } : {}), | |
| 72 | 72 | homepage: String(form.get("homepage") ?? ""), | |
| 73 | 73 | docsUrl: String(form.get("docsUrl") ?? ""), | |
| ⋯ | |||
| 173 | 173 | </h2> | |
| 174 | 174 | <p className="max-w-2xl text-xs text-muted"> | |
| 175 | 175 | Its overview follows: production for what is deployed, packages and releases for a library or a tool, and | |
| 176 | − | the steps that apply to it. Only an app or site deployed on g1t is asked to turn on Deployments. | |
| 176 | + | the steps that apply to it. Only an app or site hosted on g1t.page is asked to turn on Deployments. | |
| 177 | 177 | </p> | |
| 178 | 178 | <KindFields project={project} choice={choice} onChoice={setChoice} /> | |
| 179 | 179 | {blocked && ( | |
| ⋯ | |||
| 229 | 229 | Production image | |
| 230 | 230 | </h2> | |
| 231 | 231 | <p className="max-w-2xl text-xs text-muted"> | |
| 232 | − | The picture on its overview's production card. A screenshot is taken by itself for an app deployed on g1t, | |
| 233 | − | and of production's address for one deployed elsewhere, about once a day and after each production deployment | |
| 232 | + | The picture on its overview's production card. A screenshot is taken by itself for an app hosted on g1t.page, | |
| 233 | + | and of production's address for one that deploys itself, about once a day and after each production deployment | |
| 234 | 234 | reported to g1t. | |
| 235 | 235 | </p> | |
| 236 | 236 | <ProductionImageField | |
| 65 | 65 | updatedAt: project.updatedAt, | |
| 66 | 66 | pushedAt: project.pushedAt ?? null, | |
| 67 | 67 | activity: project.activity ?? 0, | |
| 68 | − | deploying: live.get(project.slug)?.enabled ?? false, | |
| 68 | + | // Hosted on g1t.page, or an app that deploys itself (its own workflows or pipeline). | |
| 69 | + | deploying: (live.get(project.slug)?.enabled ?? false) || (project.kind === "app" && project.runs === "elsewhere"), | |
| 69 | 70 | })); | |
| 70 | 71 | const matched = filterProjects(all, query); | |
| 71 | 72 | const shown = pageOf(matched, query.page); | |
| ⋯ | |||
| 101 | 102 | <> | |
| 102 | 103 | {language && <span>{language}</span>} | |
| 103 | 104 | {project.kind !== "app" && <span>{kindLabel(project)}</span>} | |
| 104 | − | {project.kind === "app" && project.runs === "elsewhere" && <span>Deployed elsewhere</span>} | |
| 105 | 105 | {project.deploying && ( | |
| 106 | 106 | <span className="inline-flex items-center gap-1 text-success"> | |
| 107 | 107 | <Rocket size={11} /> | |
| 108 | − | Deploys | |
| 108 | + | {project.runs === "elsewhere" ? "Deploys itself" : "Deploys"} | |
| 109 | 109 | </span> | |
| 110 | 110 | )} | |
| 111 | 111 | <span className="text-faint"> | |
Loading the diff…
Loading the diff…
Loading the diff…
Loading the diff…
Loading the diff…
Comments
Sign in to comment.