Files
wakuconnect.dev/scripts/deploy.js
Jakub Sokołowski d98faf1933 ci: fix build folder in scripts/deploy.js
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-01-11 09:24:02 +01:00

26 lines
614 B
JavaScript

const { promisify } = require('util')
const { publish } = require('gh-pages')
const ghpublish = promisify(publish)
/* fix for "Unhandled promise rejections" */
process.on('unhandledRejection', err => { throw err })
const distDir = 'dist'
const branch = 'gh-pages'
const org = 'vacp2p'
const repo = 'wakuconnect.dev'
const repoUrl = `git@github.com:${org}/${repo}.git`
const main = async (url, branch)=> {
console.log(`Pushing to: ${url}`)
console.log(`On branch: ${branch}`)
await ghpublish(distDir, {
repo: url,
branch: branch,
dotfiles: true,
silent: false
})
}
main(repoUrl, branch)