add option to use HTTPS for gh-pages

This commit is contained in:
Barry Gitarts 2020-01-14 11:22:44 -05:00
parent 0a176faf8a
commit 3983ff9306
1 changed files with 6 additions and 1 deletions

View File

@ -5,11 +5,16 @@ const ghpublish = promisify(publish)
/* fix for "Unhandled promise rejections" */
process.on('unhandledRejection', err => { throw err })
const Args = process.argv.slice(2)
const USE_HTTPS = Args[0] && Args[0].toUpperCase() === 'HTTPS'
const branch = 'gh-pages'
const org = 'status-im'
const repo = 'liquid-funding'
/* use SSH auth by default */
const repoUrl = `git@github.com:${org}/${repo}.git`
const repoUrl = USE_HTTPS
? `https://github.com/${org}/${repo}.git`
: `git@github.com:${org}/${repo}.git`
/* alternative auth using GitHub user and API token */
if (process.env.GH_USER != undefined) {