-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use gh pages (Major) #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bin/deploy-site
Outdated
process.exit(1); | ||
} | ||
|
||
const scripts = JSON.parse(fs.readFileSync(packageJson, 'utf-8')).scripts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing semicolon at EOL.
Could be simplified a bit with findup-sync:
const findUpSync = require('findup-sync');
const packageJson = findUpSync('package.json');
if (!packageJson) {
console.error('Please run in the root directory of the package');
process.exit(1);
}
const scripts = require(packageJson).scripts;
... That also wouldn't require the cwd to be the root of the repository. Especially not if you go:
childProcess.execSync('npm run generate-site', {cwd: path.dirname(packageJson)})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice - I'll try that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mhh the gh-pages also needs to run from the root. I think I'll just leave it simple as it is.
60e2505
to
5fd784f
Compare
This PR replaces the current deploy-site script with one based on gh-pages. I have removed the unused TARGET_BRANCH capabilities.
Tested on chance-generators