debug 2 #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs Preview Deploy | |
on: push | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/github-script@v7 | |
env: | |
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | |
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }} | |
with: | |
script: | | |
console.log(context); | |
// const res = await fetch(`https://api.vercel.com/v13/deployments?teamId=${process.env.VERCEL_TEAM_ID}`, { | |
// "body": JSON.stringify({ | |
// name: "edgedb-docs", | |
// gitSource: { | |
// type: "github", | |
// org: "edgedb", | |
// repo: "edgedb.com", | |
// ref: "docs-preview", | |
// }, | |
// projectSettings: { | |
// buildCommand: | |
// `EDGEDB_REPO_BRANCH=${process.env.GITHUB_REF_NAME} yarn vercel-build`, | |
// }, | |
// }), | |
// "headers": { | |
// "Authorization": `Bearer ${process.env.VERCEL_TOKEN}`, | |
// "Content-Type": "application/json", | |
// }, | |
// "method": "post" | |
// }); | |
// | |
// if (res.ok) { | |
// const deployment = await res.json(); | |
// console.log(deployment.url); | |
// | |
// } else { | |
// throw new Error( | |
// `vercel create deployment api request failed: ${res.status} ${res.statusText}` | |
// ); | |
// } |