-
Notifications
You must be signed in to change notification settings - Fork 1
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
DOP-5238 Clone docs-laravel submodule for Netlify deploys #52
Conversation
❌ Deploy Preview for site-links-display failed. Why did it fail? →
|
❌ Deploy Preview for test-monorepo-redoc failed. Why did it fail? →
|
✅ Deploy Preview for slack-deploy-extension canceled.
|
✅ Deploy Preview for git-changed-file-extension canceled.
|
❌ Deploy Preview for search-manifest-extension failed. Why did it fail? →
|
✅ Deploy Preview for snooty-cache-extension canceled.
|
✅ Deploy Preview for persistence-module-ext canceled.
|
✅ Deploy Preview for redirects-and-publish-extension canceled.
|
✅ Deploy Preview for populate-data-extension ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for redoc-ext-test canceled.
|
❌ Deploy Preview for search-manifest-integration failed. Why did it fail? →
|
|
||
// Docs-laravel requires a submodule to build | ||
if (repoName === 'docs-laravel') { | ||
process.chdir(`${repoName}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's typically better to pass in the cwd
that you want into run.command
, e.g. I think this is right: process.run(..., {cwd: reponame})
.
process.chdir()
will probably work for this purpose, but is an antipattern especially in async or threaded code because it's global process-wide state. While each task is running, and if any of these invocations throw, the process is in a bit of a weird liminal state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for pointing that out and explaining! Implemented changes accordingly
TICKET
DOP-5238 Clone docs-laravel submodule for Netlify deploys
NOTES
The docs-laravel repo has a submodule that is necessary for it to build properly. The repo already has a special build script for the docs-laravel Netlify site. This PR updates the laravel submodule and therefore enables docs-laravel to build on frontend-sourced Netlify sites(docs-frontend-stg, docs-frontend-dotcomstg, docs-frontend-dotcomprd)
The submodule is cloned in the same way as in this build script: https://github.com/10gen/docs-laravel/blob/v4.x/build.sh
STAGING LINKS
docs-frontend-dotcomstg laravel permalink. Deployed with netlify-test-deploy on Slack
docs-frontend-stg laravel permalink Deployed manually on netlify-testing-2 Snooty frontend branch