Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix deploy-pages@v4 #287

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

Closed
wants to merge 2 commits into from
Closed

Fix deploy-pages@v4 #287

wants to merge 2 commits into from

Conversation

ntkme
Copy link

@ntkme ntkme commented Dec 20, 2023

This PR can potentially fix #284, fix #285, and fix #286. However, we need some help from GitHub employee as well (see below).

The current API of POST /repos/{owner}/{repo}/pages/deployment (doc) does not take artifact_id parameter, that it would only take artifact_url. @TooManyBees I'm not sure if this is intended for an unreleased upcoming version of the API, or it was an oversight.

Although this PR updates the code to provide the right download url for artifact v4 as the artifact_url parameter, now we're running into an Invalid artifact url error. This is likely due to the new hostnames in artifact v4 urls are not whitelisted in the /pages/deployment API. We probably need a GitHub employee to fix this:

Fetching artifact metadata for github-pages in run 7270020694
Creating Pages deployment with payload:
{
	"artifact_url": "https://productionresultssa9.blob.core.windows.net/actions-results/[redacted]/workflow-job-run-[redacted]/artifacts/github-pages.zip?[redacted]",
	"pages_build_version": "e54f21245b26850049817d92f0c6a9ecf40cf986",
	"oidc_token": "***"
}
Error: Creating Pages deployment failed
Error: HttpError: Invalid artifact url

@JamesMGreene Pinging you as it seems that you might be the right person to help resolve the Invalid artifact url error based on similar issues in the past.

@ntkme ntkme requested a review from a team as a code owner December 20, 2023 03:15
tbouffard referenced this pull request in process-analytics/bpmn-visualization-addons Dec 20, 2023
Also bump actions/upload-pages-artifact from 2 to 3, because this version of
actions/deploy-pages is ONLY compatible with artifacts uploaded by
actions/upload-pages-artifact@v3 or newer.
@JamesMGreene
Copy link
Contributor

We appreciate your contribution but this is not the change that we need or want moving forward. We have a change in progress on the GitHub API side to clear a blocker up, plus a forthcoming PR with #288 that will alleviate the need for adding the actions: read permission.

@JamesMGreene JamesMGreene self-assigned this Dec 20, 2023
@ntkme ntkme deleted the fix-v4 branch December 20, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants