Skip to content

Commit

Permalink
Add PR previews with Netlify (#5787)
Browse files Browse the repository at this point in the history
It would be preferable to only generate these for UI PRs but Netlify appears to
not have that flexibility. I tried setting up manual deployments in a Travis
environment but gave up the experiment; it could probably eventually work if
deployment failures become a nuisance.
  • Loading branch information
backspace authored Jun 10, 2019
1 parent 21a617a commit 0385424
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .netlify/state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"siteId": "a3e19a5f-a18e-40b7-b943-bd0f96ba354f"
}
18 changes: 18 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Netlify is installed under the hc-nomad bot account on GitHub.

[build]
# The generated site needs to live at /ui/, so this moves it there after building.
command = "ember build && mkdir -p ui-dist/ui && mv dist/* ui-dist/ui/"
base = "ui"
publish = "ui/ui-dist"

# This ensures that following the link from the PR checks list redirects to the subdirectory.
[[redirects]]
from = "/"
to = "/ui/"

# This catches other unknown URLs and lets Ember handle them.
[[redirects]]
from = "/*"
to = "/ui/index.html"
status = 200

0 comments on commit 0385424

Please sign in to comment.