Closed ultrasaurus closed 8 years ago
@jeremiak I forgot about the tests. I think the preview page itself is counted as a "project page"
@gboone not sure this is ready to go, but would be good to review our approach -- we can demo on Monday
I think the test failure is happening because we're generating the "preview" page in addition to all the project pages so there's always one extra now. I can patch that up quick to get this to merge.
@ultrasaurus @jeremiak was there anything else we wanted to do for this before merging?
@gboone I'm going to comment out some of the markdown changes that @ultrasaurus and I did (per what we talked about during the demo earlier this week) but I had a few questions about how we can deploy this.
Currently, the compiled JS code is committed to the repo (preview-bundle.js
), which is less than ideal as it will probably cause annoying merge conflicts at some point. That being said, to generate the bundle one must have node/npm, install the deps and then run the build process. Given that the dashboard has just required Ruby up until now, what do you think is the best way we should get this build task done on the deployment?
I guess some background information on how the current deployment works would be helpful.
I'm pretty sure node is installed on that server. Earlier versions of Jekyll required it and I don't think anybody removed node after we upgraded to 3.0 so generating it should be possible. Best way is probably to add it to the go
script and make sure it runs during the ci_build
, deploy
, build
, and serve
commands.
:+1: I'll add it to the ./go
script.
@gboone so now I've updated the ./go
script to both install node dependencies and run the node build processes on ./go build
and ./go serve
and it builds green on Travis.
Will this work for the deploy
script? When does that get run? I have updated that to also trigger the javascript tasks (I think) but not sure how to test it
deploy
runs when the server receives a webhook, so every pull request merged here or any rebuild of the team api. You should be able to run deploy
locally. I think you could do something like bundle exec jekyll serve --no-watch --detach
then ./go deploy
.
That should start the jekyll server without watching and send it to the background. Then deploy
will build the site as it'd be done on the server. If you wanted you could add bundle exec jekyll clean
before deploy
, too, to wipe out the generated _site
directory.
Great, then I think this is ready to merge whenever. I tested locally and it looks like that deploy process works just fine.
thanks @jeremiak -- merging to staging
this worked well for me to preview Open Opps
you can test it with this URL running locally:
http://localhost:4000/dashboard/project/preview?url=https://github.com/18F/openopps-platform/blob/dev/.about.yml