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

Deploy Node app to Now #226

Merged
merged 15 commits into from
Aug 22, 2018
Merged

Deploy Node app to Now #226

merged 15 commits into from
Aug 22, 2018

Conversation

shawnbot
Copy link
Contributor

@shawnbot shawnbot commented Aug 22, 2018

This builds on #221 and configures the app to deploy with Node app rather than statically.

TODO

  • Remove "type": "static" from now.json
  • Rename build:docs npm run-script to build so that Now will build docs on deployment
  • Install serve and use it to serve the built docs folder
  • Remove docs directory from git, and add it to .gitignore
  • Get manual deployment working
  • Get automated deployment (via the PR) working

@vercel
Copy link

vercel bot commented Aug 22, 2018

This pull request is automatically deployed with Now.

To access deployments, click Details below or on the icon next to each push.

"files": [
"examples",
"rollup.config.js",
"src"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I honestly don't know why these files needed to be explicitly whitelisted, but Now doesn't seem to want to copy them by default.

"public": "docs",
"rewrites": [
{"source": "/components/*", "destination": "/index.html"},
{"source": "/demos/*", "destination": "/index.html"}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These redirects make the component and demo subpages work dynamically.

@shawnbot shawnbot changed the title [WIP] Deploy Node app to Now Deploy Node app to Now Aug 22, 2018
@shawnbot
Copy link
Contributor Author

@emplums @jonrohan I think this is good to go! It's up to you all whether you'd rather merge #221 first and then bring this into the release branch or merge this into #221 and update that PR with all the details.

This was referenced Aug 22, 2018
Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

tumblr_m55qpoqgfg1rxevt4o1_400

I'm good with merging the first PR then this one.

@shawnbot shawnbot changed the base branch from deploy-now to release-2.0.1-beta August 22, 2018 23:32
@shawnbot shawnbot merged commit ade10b3 into release-2.0.1-beta Aug 22, 2018
@shawnbot shawnbot deleted the deploy-now-node branch August 22, 2018 23:32
Copy link

@emplums emplums left a comment

Choose a reason for hiding this comment

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

YAY! Looks great!

<meta name='og:title' content='Primer React'>
<meta name='description' content='Primer components built with React.js.'>
<link rel='icon' href='https://primer.github.io/favicon.png'>
<link rel='stylesheet' href='${basename}/dist/css/build.css'>
Copy link

Choose a reason for hiding this comment

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

YAY!

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.

3 participants