Skip to content

Commit

Permalink
Merge pull request #500 from GSA/ss_deploy_fix
Browse files Browse the repository at this point in the history
Ss deploy fix
  • Loading branch information
Sean authored Oct 2, 2020
2 parents eec5ee9 + 4e961c3 commit 9b75857
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ const env_vars = {
}

console.log('env_vars', env_vars)
console.log('unlinking ./dist/.gitignore')
fs.unlinkSync('./dist/.gitignore')

try {
if (fs.existsSync('./dist/.gitignore')) {
console.log('unlinking ./dist/.gitignore')
fs.unlinkSync('./dist/.gitignore')
}
} catch (err) {
console.log(err)
}

if (!DIR) {
throw new Error('please specify CODE_GOV_DIR as an env variable')
Expand All @@ -30,28 +37,27 @@ const options = {
repo: process.env.CODE_GOV_REPO || '[email protected]:GSA/code-gov-front-end'
}

console.log('options:', options)

if (process.env.CODE_GOV_BRANCH) {
options.branch = process.env.CODE_GOV_BRANCH
} else {
throw new Error('no branch specified')
}

//if (!process.env.CODE_GOV_REPO) {
console.log('options:', options)
// if (!process.env.CODE_GOV_REPO) {
// throw new Error("no repo specified")
//}
// }
//
//if (!process.env.CODE_GOV_API_KEY) {
// if (!process.env.CODE_GOV_API_KEY) {
// throw new Error("no api specified")
//}
// }

//ghpages.clean()
// ghpages.clean()
//
//ghpages.publish(DIR, options, err => {
// ghpages.publish(DIR, options, err => {
// if (err) {
// console.error(err);
// } else {
// console.log("published successfully");
// }
//});
// });

0 comments on commit 9b75857

Please sign in to comment.