Vercel is the platform for frontend developers, providing the speed and reliability innovators need to create at the moment of inspiration.
Executes a command on a remote device. See SSH lib docs here
List deployments under the account corresponding to the API token. See the docs
The Vercel API empowers developers to automate, manage, and interact with their Vercel projects and deployments directly through code. With the Vercel API on Pipedream, you can harness the power of serverless functions to create dynamic and responsive workflows. Automate deployment processes, sync deployment statuses with other tools, trigger notifications based on deployment events, or manage your domains and aliases—all within the seamless integration landscape of Pipedream.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
vercel_token_auth: {
type: "app",
app: "vercel_token_auth",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.vercel.com/www/user`,
headers: {
Authorization: `Bearer ${this.vercel_token_auth.$auth.personal_access_token}`,
},
})
},
})
The SSH (Secure Shell) key-based authentication API allows you to execute commands on a remote server securely. With Pipedream, leverage this capability to automate server management tasks, execute deployment scripts, or gather data from your server infrastructure. By integrating with other apps on Pipedream, you can create seamless workflows that trigger actions on your servers in response to various events.
module.exports = defineComponent({
props: {
ssh: {
type: "app",
app: "ssh",
}
},
async run({steps, $}) {
const SSH2Promise = require('ssh2-promise')
const {
host,
port,
username,
privateKey,
} = this.ssh.$auth
const ssh = new SSH2Promise({
host,
port,
username,
privateKey,
})
await ssh.connect()
console.log("Connection established")
// Replace this with the command you'd like to run
const resp = await ssh.exec("whoami")
console.log(resp)
await ssh.close()
},
})