Skip to content

Commit 8562bcf

Browse files
authored
fix: update main docs also on release events (#684)
1 parent ec45aee commit 8562bcf

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
git config --global user.name "${{ github.actor }}"
4545
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
4646
- name: Deploy to main
47-
if: ${{ github.ref_name == 'main' }}
47+
# Update main also on release events to refresh versions in installation instructions
48+
if: ${{ github.ref_name == 'main' || github.event_name == 'release' }}
4849
run: mike deploy --push --title "Unreleased (main)" main
4950
- name: Deploy to latest
5051
if: ${{ github.event_name == 'release' }}

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ make docs
4343
mkdocs serve
4444
```
4545

46+
Note that documentation in GitHub pages is versioned with `mike`. See [docs](.github/workflows/docs.yml) workflow for more details. The versions are `main` and `latest`:
47+
48+
- The `main` version is updated on every push to `main` branch. It is useful for reviewing new commands and features. The `main` version often contains instructions for features that are not yet released.
49+
- The `latest` version is updated on every release. It is the default version and only contains released commands and features to avoid confusion for end-users.
50+
4651
## Contributing
4752

4853
Contributions from the community are much appreciated! Please note that all features using our

0 commit comments

Comments
 (0)