Skip to content

Commit

Permalink
ci: handle preview URL in app
Browse files Browse the repository at this point in the history
  • Loading branch information
romgere committed Dec 8, 2022
1 parent 69a4168 commit 27a957d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,10 @@ module.exports = function(environment) {
}

if (environment === 'production') {
// here you can enable a production-specific feature
ENV.rootURL = 'https://text2stl.mestres.fr/'
// Use the preview URL if it's a netlify preview deploy, production URL otherwise
ENV.rootURL = process.env.CONTEXT === 'deploy-preview'
? process.env.DEPLOY_URL
: 'https://text2stl.mestres.fr/'
}

return ENV
Expand Down

0 comments on commit 27a957d

Please sign in to comment.