Skip to content

Commit

Permalink
feat: enhance release workflow to publish version of docs using mike …
Browse files Browse the repository at this point in the history
…after PR release

fix: update docs to explain mike
  • Loading branch information
jjjermiah committed Oct 29, 2024
1 parent 252f3e2 commit 72345a7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 10 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,27 @@ jobs:
release-please:
runs-on: ubuntu-latest
steps:

- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
release-type: simple

- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
with:
fetch-depth: 0

- name: Install Pixi
if: ${{ steps.release.outputs.release_created }}
uses: prefix-dev/[email protected]
with:
pixi-version: v0.34.0
cache: true
locked: false

- name: Deploy Documentation Using Mike and Released Version
if: ${{ steps.release.outputs.release_created }}
run: |
VERSION=$(echo ${{ steps.release.outputs.tag_name }} | sed 's/v//')
echo "Deploying version $VERSION"
pixi run mike deploy --push --update-aliases $VERSION latest
23 changes: 14 additions & 9 deletions docs/contributing/release_deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ The automated workflow includes the following steps:
Once the `gh-pages` branch is updated, GitHub Pages will automatically publish
the latest version of the website.

## Releases
## Releases and Versioned Documentation

Even though this project primarily uses MkDocs, we leverage
[release-please](https://github.com/googleapis/release-please) to automate the
release process, making it easier to maintain version control and changelogs.
We leverage both [release-please](https://github.com/googleapis/release-please)
and `mike` to automate the release process and manage versioned documentation,
making it easier to maintain version control, changelogs, and multiple
documentation versions.

### How It Works

Expand All @@ -49,18 +50,22 @@ process.
You can view the release automation action at
[this link](https://github.com/bhklab/handbook/actions/workflows/release-please.yaml).

Key benefits of using `release-please` include:
Key aspects of this combined approach include:

- **Automated Release Creation**: The tool automatically generates a release
with changelogs and updates the version number based on the changes merged
into `main`.
- **Automated Release Creation with release-please**: The tool automatically
generates a release with changelogs and updates the version number based
on the changes merged into `main`.
- **Dynamic Pull Request Updates**: If additional changes are pushed to the
`main` branch after a pull request is created, the release PR will update to
include those changes, ensuring that the release captures all intended
updates.
- **Controlled Release Process**: Maintainers can merge changes into the
release PR only when they are ready to publish a new version, giving them
full control over the timing of each release.
- **Versioned Documentation with mike**: Once a new release is prepared,
`mike` is used to manage and deploy versioned documentation. This allows us
to provide a separate set of documentation for each release, maintaining
historical versions accessible on the website.

This automated approach ensures consistency and reduces the manual effort
This automated approach ensures consistency, reduces manual effort, and allows users to access documentation relevant to any specific version of the project.
required to manage releases.

0 comments on commit 72345a7

Please sign in to comment.