snaplet / vercel-action Goto Github PK
View Code? Open in Web Editor NEW▲ Vercel Preview Github Action
Home Page: https://vercel.com
▲ Vercel Preview Github Action
Home Page: https://vercel.com
It would be cool if this `vercel-action' could output the VERCEL_URL so it can be used by other steps following the deploy like e2e tests and such.
This is my workflow file:
name: Vercel Preview Deployment
env:
VERCEL_ACCESS_TOKEN: ${{ secrets.VERCEL_ACCESS_TOKEN }}
VERCEL_PROJECT_ID: <project-id>
on:
pull_request:
types: [opened, synchronize, closed]
jobs:
deploy-vercel-preview:
if: ${{ github.event.action == 'opened' || github.event.action == 'synchronize' }}
runs-on: ubuntu-latest
steps:
- uses: snaplet/vercel-action@v2
delete-vercel-preview:
if: ${{ github.event.action == 'closed' }}
runs-on: ubuntu-latest
steps:
- uses: snaplet/vercel-action@v2
with:
delete: true
Based on the above workflow file, I'm getting the following error message when a new pull request is created:
Creating deploy hook...
Deploy hook created.
Creating deployment...
node:internal/deps/undici/undici:5573
throw new TypeError("Failed to parse URL from " + input, { cause: err });
^
TypeError: Failed to parse URL from undefined
at new Request (node:internal/deps/undici/undici:5573:19)
at Agent.fetch2 (node:internal/deps/undici/undici:6[37](https://github.com/realtimeskills/oslash/actions/runs/3636809230/jobs/6137131079#step:2:40)1:25)
... 2 lines matching cause stack trace ...
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
[cause]: TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:565:9)
at new URL (node:internal/url:641:5)
at new Request (node:internal/deps/undici/undici:5571:25)
at Agent.fetch2 (node:internal/deps/undici/undici:6371:25)
at fetch (node:internal/deps/undici/undici:7200:20)
at file:///home/runner/work/_actions/snaplet/vercel-action/v2/scripts/deploy.mjs:49:23
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
input: 'undefined',
code: 'ERR_INVALID_URL'
}
}
Error: Process completed with exit code 1.
I'm getting a warning in my action that Github is deprecating the set-output command. Setting the deployment URL here should probably write to the GITHUB_OUTPUT
environment variable.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.