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

Pr preview #20

Closed
wants to merge 7 commits into from
Closed
2 changes: 1 addition & 1 deletion docs/_includes/nav_footer_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@
localStorage.setItem('theme', 'dark');
}
});
</script>
</script>
28 changes: 25 additions & 3 deletions docs/docs/releaseprocess.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ layout: default

# Release Process

This page describes the release process for **KubeTidy**, which involves using GitHub Actions to automate the release of the module to the PowerShell Gallery, the Krew plugin, and to update the documentation.
This page describes the release process for KubeTidy, which involves using GitHub Actions to automate the release of the module to the PowerShell Gallery, the Krew plugin, deploying documentation updates to GitHub Pages, and previewing website changes in pull requests.

## How to Create and Push a Tag

Expand Down Expand Up @@ -37,6 +37,26 @@ The GitHub Pages action is triggered when:
- A commit is pushed to the `main` branch that affects files in the `docs/` folder.
- The workflow is manually triggered through GitHub's Actions tab.

## PR Preview Deployment
For pull requests that modify documentation, we have added a new GitHub Action to automatically deploy a preview of the updated website. This allows you to review how the documentation will look before merging the PR into the main branch.

### How PR Previews Work
The Deploy PR CI action uses the rossjrw/pr-preview-action to generate a preview of the website. When a pull request affecting files in the docs/ folder is opened or updated, this action is triggered to build and deploy a preview of the documentation changes.

The preview site is deployed to a unique URL using the following structure:

```bash
/pr-preview/pr-<PR_number>
```

This allows reviewers to easily view the proposed changes as they would appear on the live site before merging the PR.

### Triggering the PR Preview Action
The PR preview action is triggered when:

A pull request affecting files in the docs/ folder is opened, updated, or reopened.
The pull request is closed (the preview environment is cleaned up).

## GitHub Actions Workflows

We use several GitHub Actions workflows to automate the release process. You can view the full details of these workflows directly in the repository:
Expand All @@ -47,8 +67,10 @@ We use several GitHub Actions workflows to automate the release process. You can

3. **[Deploy Jekyll Site to Pages](https://github.com/PixelRobots/KubeTidy/blob/main/.github/workflows/deploy-docs.yml)**: This action builds and deploys the documentation site to GitHub Pages when changes are pushed to the `docs/` folder.

4. **[Deploy PR Preview](https://github.com/PixelRobots/KubeTidy/blob/main/.github/workflows/deploy-pr.yaml)**: This action builds and deploys a preview of the website for pull requests affecting the `docs/` folder.

## Summary

These actions automate the release process and make it easy to manage releases across multiple platforms.
These actions automate the release process and make it easy to manage releases across multiple platforms. The addition of PR previews enhances the review process by allowing contributors to see how documentation updates will appear on the live site before merging.

For more details, please refer to the [workflows folder](https://github.com/PixelRobots/KubeTidy/tree/main/.github/workflows) in the repository.
For more details, please refer to the [workflows folder](https://github.com/PixelRobots/KubeTidy/tree/main/.github/workflows) in the repository.
Loading