Skip to content
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

Merged
merged 3 commits into from
Oct 30, 2018
Merged

Use gh pages (Major) #8

merged 3 commits into from
Oct 30, 2018

Conversation

sunesimonsen
Copy link
Member

@sunesimonsen sunesimonsen commented Oct 30, 2018

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

Copy link
Member

@papandreou papandreou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

bin/deploy-site Show resolved Hide resolved
bin/deploy-site Outdated
process.exit(1);
}

const scripts = JSON.parse(fs.readFileSync(packageJson, 'utf-8')).scripts
Copy link
Member

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)})

Copy link
Member Author

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.

Copy link
Member Author

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.

bin/deploy-site Outdated Show resolved Hide resolved
.npmrc Outdated Show resolved Hide resolved
@sunesimonsen sunesimonsen merged commit 328892b into master Oct 30, 2018
@sunesimonsen sunesimonsen deleted the ssimonsen/use-gh-pages branch October 30, 2018 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants