Deploy
Orbiter makes it easy to deploy a static site, no matter what your preference is! In this doc we'll go over multiple ways you can deploy with Orbiter.
CLI
Install and authorize the orbiter-cli
with your API Key
npm i -g orbiter-cli
orbiter auth
Create a new site from a template
orbiter new
Deploy an existing project
orbiter deploy
This will setup your project with an orbiter.json
configuration file that will be referenced for future deployments or updates where you can just run deploy
again!
Web App
The Orbiter App makes it simple to deploy your site. Simply login, click on "Create Site", then select your File or Folder, give it a domain, and deploy!
Told you it was easy
Automated GitHub Deployments
For those who like to just git push
and forget about it, the Orbiter GitHub Actions are the perfect solution. Check out our guide on how to use them!
API
If you want to build Orbiter deployments elsewhere you can use our API!
First you will want to make an API Key from our API Keys Page from within the Orbiter app.
Orbiter used Pinata to deploy sites to IPFS, so in order to deploy a site through the API you will need to upload it first. Orbiter provides an upload_key
endpoint that will give you a temproary Pinata API key to upload with. Once you upload the file or folder and get the CID back, you can use this CID in the Orbiter API call to create a site.
import { PinataSDK } from "pinata-web3"
const pinata = new PinataSDK({
pinataJwt: "",
pinataGateway: ""
})
const keyReq = await fetch("https://api.orbiter.host/keys/upload_key", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Orbiter-API-Key": "<YOUR-API-KEY>"
},
body: null
})
const keyRes = await keyReq.json()
const files: File[] = [] // Get a folder of files either locally or through a front end
const upload = await pinata.upload.fileArray(files).key(keyRes.data)
const deploySite = await fetch("https://api.orbiter.host/sites", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Orbiter-API-Key": "<YOUR-API-KEY>"
},
body: JSON.stringify({
cid: upload.IpfsHash,
subdomain: "my-site"
})
})
To learn what else you can do with our API check out the API Reference!