Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add parity with pages-action for Pages deploy outputs #303

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

courtney-sims
Copy link

@courtney-sims courtney-sims commented Oct 18, 2024

Enables Pages deploys to provide outputs for id, environment, url, and alias, just like they can in pages-action. The current way of getting deploy outputs with Workers is via wrangler output to std out, but this information for Pages was not available in std out.

Because of that, this change adds a new method for getting outputs via wrangler artifacts.

The new outputs look like this in the Actions view.

When an alias is not available in the artifact:
Screenshot 2024-10-18 at 2 38 10 PM

When an alias is available in the artifact:
Screenshot 2024-10-18 at 2 41 05 PM

When we don't get stuff back from the request for artifact:
Screenshot 2024-10-21 at 10 14 05 AM

@courtney-sims courtney-sims requested review from a team as code owners October 18, 2024 21:55
src/index.ts Show resolved Hide resolved
package.json Show resolved Hide resolved
@courtney-sims courtney-sims marked this pull request as draft October 21, 2024 15:00
@courtney-sims courtney-sims force-pushed the courtney-sims-enable-outputs branch 3 times, most recently from 1d56fe8 to 62ce1c3 Compare October 21, 2024 16:53
@courtney-sims courtney-sims marked this pull request as ready for review October 21, 2024 17:00
@courtney-sims courtney-sims marked this pull request as draft October 22, 2024 20:37
@courtney-sims courtney-sims marked this pull request as ready for review October 22, 2024 21:05
} from "./wranglerArtifactManager";

describe("wranglerArtifactsManager", () => {
const mock = require("mock-fs");
Copy link
Member

@Maximo-Guk Maximo-Guk Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably be using an es6 style import here

expect(artifacts).toEqual([
"./testOutputDir/wrangler-output-2024-10-17_18-48-40_463-2e6e83.json",
]);
mock.restore();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably move mock.restore() in to an afterEach()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants