Skip to content

Commit

Permalink
fix some API invocation to match the GH REST documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Okeanos committed Mar 29, 2024
1 parent 1180e68 commit 543c485
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/pages-gh-cli-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@ jobs:
--method POST \
--header "Accept: application/vnd.github+json" \
--header "X-GitHub-Api-Version: 2022-11-28" \
"/repos/${GH_REPOSITORY}/pages/deployment" \
-f artifact_url="${GH_ARTIFACT}" \
"/repos/${GH_REPOSITORY}/pages/deployments" \
-f artifact_url="${GH_ARTIFACT_URL}" \
-f environment='github-pages' \
-f pages_build_version="${GH_SHA}" \
-f oidc_token="${GH_TOKEN}"
-f oidc_token="${GH_TOKEN}" \
-F preview=false
env:
GH_REPOSITORY: ${{ github.repository }}
GH_SHA: ${{ github.sha }}
GH_TOKEN: ${{ github.token }}
GH_ARTIFACT: ${{ steps.artifact-url.outputs.url }}
GH_ARTIFACT_URL: ${{ steps.artifact-url.outputs.url }}
7 changes: 3 additions & 4 deletions .github/workflows/pages-gh-cli-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ jobs:
GH_TOKEN: ${{ github.token }}
- name: Setup Page
run: |
jq --null-input --raw-output \
'{ "build_type": "workflow" }' \
> request.json
method=POST
if [[ ${PAGE_CONFIGURED} = true ]]; then
method=PUT
Expand All @@ -84,6 +80,9 @@ jobs:
# Causes a Resource not accessible by integration (HTTP 403) error
# Probably related to https://github.com/orgs/community/discussions/35595
# jq --null-input --raw-output \
# '{ "build_type": "workflow" }' \
# > request.json
# gh api \
# --method ${method} \
# --header "Accept: application/vnd.github+json" \
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/pages-gh-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,12 @@ jobs:
--method POST \
--header "Accept: application/vnd.github+json" \
--header "X-GitHub-Api-Version: 2022-11-28" \
"/repos/${GH_REPOSITORY}/pages/deployment" \
"/repos/${GH_REPOSITORY}/pages/deployments" \
-f artifact_id="${GH_ARTIFACT_ID}" \
-f environment='github-pages' \
-f pages_build_version="${GH_SHA}" \
-f oidc_token="${GH_TOKEN}"
-f oidc_token="${GH_TOKEN}" \
-F preview=false
env:
GH_REPOSITORY: ${{ github.repository }}
GH_SHA: ${{ github.sha }}
Expand Down

0 comments on commit 543c485

Please sign in to comment.