Skip to content

Commit 346314d

Browse files
mrstorkpieh
andauthored
test: use branch/alias deploys for e2e test suite (#39222)
* test: use branch/alias deploys for e2e test suite * test: use permalink url and not alias url --------- Co-authored-by: Michal Piechowiak <[email protected]>
1 parent aa403a4 commit 346314d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: e2e-tests/adapters/scripts/deploy-and-run/netlify.mjs

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,16 @@ const npmScriptToRun = process.argv[2] || "test:netlify"
1818
// ensure clean build
1919
await execa(`npm`, [`run`, `clean`], { stdio: `inherit` })
2020

21+
const deployAlias = "gatsby-e2e-tests"
2122
const deployResults = await execa(
2223
"npx",
2324
[
2425
"ntl",
2526
"deploy",
2627
"--build",
2728
"--json",
29+
"--alias",
30+
deployAlias,
2831
"--message",
2932
deployTitle,
3033
process.env.EXTRA_NTL_CLI_ARGS ?? "--cwd=.",
@@ -47,7 +50,9 @@ if (deployResults.exitCode !== 0) {
4750

4851
const deployInfo = JSON.parse(deployResults.stdout)
4952

50-
const deployUrl = deployInfo.deploy_url + (process.env.PATH_PREFIX ?? ``)
53+
const deployUrl =
54+
`https://${deployInfo.deploy_id}--${deployInfo.site_name}.netlify.app` +
55+
(process.env.PATH_PREFIX ?? ``)
5156
process.env.DEPLOY_URL = deployUrl
5257

5358
console.log(`Deployed to ${deployUrl}`)

0 commit comments

Comments
 (0)