Closed jgarber623-gov closed 6 years ago
I think we should talk about how we're going to roll this out initially... maybe Thursday when I'm back?
I think we should talk about how we're going to roll this out initially... maybe Thursday when I'm back?
@jordangov Thursday's good for me!
This pull request refactors the project to allow for deployments to Netlify. This change will allow us to streamline our development workflow, deployment process, and hosting environment.
You can review the Netlify-deployed version of the site at https://code-mil.netlify.com.
Code Changes
I'll document significant changes inline, so check out the Files Changed tab for details (or scroll down this page for the grouped commentary).
Verifying Changes
git checkout netlify
rvm install 2.4.3
) and install Bundlergem install bundler
bundle install
./scripts/build
to build the site or./scripts/serve
to serve the site locally onhttp://localhost:4000
Workflow Changes
Presuming this pull request is merged and we move forward with Netlify hosting, I recommend we modify our workflow to follow a pattern like:
master
some-long-hash--code-mil.netlify.com
)master
which Netlify auto-deploys to a staging URL (e.g.beta.code.mil
)beta.code.mil
results in a promotion ofmaster
code to a protectedproduction
branch which Netlify auto-deploys tocode.mil
Deploys to production would bypass CI, but this seems reasonable given the review process and auto-deployment of branches to URLs.
DNS Changes
We'll want to work with the relevant parties to update DNS entries for
code.mil
,www.code.mil
,beta.code.mil
, etc.But! We may need to contact Netlify support if we want to keep using something like
beta.code.mil
:(from https://www.netlify.com/docs/custom-domains/#branch-subdomains)
I'd venture, though, that we could auto-deploy all branches and work with the resulting auto-generated subdomains. This would be a non-issue if/when we control the DNS for
code.mil
.WebPageTest Results
Before
After