Skip to content
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

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii added the core Infrastructure work going on behind the scenes label Feb 22, 2023
@mui-bot
Copy link

mui-bot commented Feb 22, 2023

Netlify deploy preview

https://deploy-preview-36301--material-ui.netlify.app/

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against dff9a65

@cherniavskii cherniavskii marked this pull request as ready for review February 22, 2023 20:02
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

4. Push the changes to the `material-ui-docs` remote:

```sh
git push
Copy link
Member

@oliviertassinari oliviertassinari Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually do this:

Suggested change
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.

2. Check out the `latest` branch from `material-ui-docs` remote:

```sh
git checkout --track material-ui-docs/latest
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually do:

Suggested change
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.

Copy link
Member Author

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?

Copy link
Contributor

@mapache-salvaje mapache-salvaje left a 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 !

@hbjORbj hbjORbj merged commit ccac329 into mui:master Mar 6, 2023
@cherniavskii cherniavskii deleted the add-docs-deployment-instructions branch March 9, 2023 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants