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

[core] Describe how to publish the docs #320

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Loading