-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Add instructions for deploying docs without a release #36301
[docs] Add instructions for deploying docs without a release #36301
Conversation
cherniavskii
commented
Feb 22, 2023
- I have followed (at least) the PR section of the contributing guide.
Netlify deploy previewhttps://deploy-preview-36301--material-ui.netlify.app/ Bundle size report |
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.
Nice 👍
scripts/README.md
Outdated
4. Push the changes to the `material-ui-docs` remote: | ||
|
||
```sh | ||
git push |
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.
I usually do this:
git push | |
git push material-ui-docs HEAD:latest |
When your work on an alpha branch, both repositories use next
for the name of the branch. It can be ambiguous.
scripts/README.md
Outdated
2. Check out the `latest` branch from `material-ui-docs` remote: | ||
|
||
```sh | ||
git checkout --track material-ui-docs/latest |
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.
I usually do:
git checkout --track material-ui-docs/latest | |
git reset --h material-ui-docs/latest |
to not have to care about branches. If I run git checkout --track material-ui-docs/latest
it tells me that the branch already exists.
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.
Good catch, git checkout
isn't a good solution in this case.
git reset --h material-ui-docs/latest
has a drawback too - it will reset the branch you're currently on to the material-ui-docs/latest
, so you might lose the commits on this branch if the branch is local-only.
We can do this instead:
git switch --detach material-ui-docs/latest
It will not impact your current branch since it only detaches the HEAD.
After adding more commits, you can push it to material-ui-docs/latest
with:
git push material-ui-docs HEAD:latest
What do you think?
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.
text looks great! Thanks for putting this together @cherniavskii !