Skip to content

Commit

Permalink
[core] Describe how to publish the docs (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaldudak authored Apr 16, 2024
1 parent 15b00bf commit 6ad80bf
Showing 1 changed file with 11 additions and 44 deletions.
55 changes: 11 additions & 44 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,54 +41,21 @@ The following steps must be proposed as a pull request.
3. `pnpm release:publish` (release the versions on npm, you need your 2FA device)
4. `pnpm release:tag` (push the newly created tag)
### Documentation
### Publish the documentation
`pnpm docs:deploy` to deploy the documentation (it lives at https://material-ui.netlify.app/) with the latest changes.
Force push if necessary.
The documentation must be updated on the `docs-vX` branch (`docs-v1` for `v1.X` releases, `docs-v2` for `v2.X` releases, etc.)
### Announce
Follow the instructions in https://mui-org.notion.site/Releases-7490ef9581b4447ebdbf86b13164272d.
## Deploy documentation without a release
Sometimes it is necessary to deploy the selected commit(s) without
deploying all the changes that have been merged into the main branch
since the previous release (for example publishing a blog post or releasing
urgent docs updates).
To do so, follow these steps:
1. Add the `material-ui-docs` remote if you haven't done this already:

```bash
git remote add material-ui-docs https://github.com/mui/material-ui-docs.git
```

2. Switch to the `latest` branch from `material-ui-docs` remote:

```bash
git switch --detach material-ui-docs/latest
```
Push the working branch to the documentation release branch to deploy the documentation with the latest changes.
3. Cherry-pick the commit(s) that you want to include in the new deployment:
<!-- #default-branch-switch -->
```bash
git cherry-pick <commit>
```
```bash
git push -f upstream master:docs-v1
```
It will commit the changes if there are no conflicts.
You can follow the deployment process [on the Netlify Dashboard](https://app.netlify.com/sites/material-ui-x/deploys?filter=docs-next)
Once deployed, it will be accessible at https://material-ui-x.netlify.app/ for the `docs-next` deployment.
In case of conflicts you will need to resolve them and commit the changes manually.

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

```bash
git push material-ui-docs HEAD:latest
```

5. Switch from detached `HEAD` back to your last checked out branch:
### Announce
```bash
git checkout -
```
Follow the instructions in https://mui-org.notion.site/Releases-7490ef9581b4447ebdbf86b13164272d.

0 comments on commit 6ad80bf

Please sign in to comment.