-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #500 from GSA/ss_deploy_fix
Ss deploy fix
- Loading branch information
Showing
1 changed file
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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') | ||
|
@@ -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"); | ||
// } | ||
//}); | ||
// }); |