Skip to content

Commit

Permalink
Add doc versioning (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
Korbeil committed Mar 22, 2024
1 parent 08b5b9d commit cc97be9
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 4 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,32 @@ jobs:
with:
submodules: recursive
fetch-depth: 0
fetch-tags: true

- name: Install dependencies
run: poetry install --no-root
run: poetry install

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Build with mkdocs
run: poetry run mkdocs build
- name: Build documentation for 8.x
run: poetry run mike deploy --push --update-aliases dev

- name: Checkout latest 8.x tag
run: git checkout tags/8.2.2

- name: Build documentation for 8.x
run: poetry run mike deploy --push --update-aliases 8.2.2 latest

- name: Checkout latest 8.x tag
run: git checkout 9.0 # currently a branch, will be a tag later on

- name: Build documentation for 9.x
run: poetry run mike deploy --push --update-aliases 9.0-BETA

- name: Flag default version
run: mike set-default --push latest

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Documentation
- [GH#91](https://github.com/jolicode/automapper/pull/91) Add documentation versioning

## [8.2.2] - 2024-03-19
### Added
- [GH#54](https://github.com/jolicode/automapper/pull/54) Introduce `MapperContext::DATETIME_FORCE_TIMEZONE`
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ extra:
- icon: fontawesome/brands/x-twitter
link: https://twitter.com/jolicode
generator: false
version:
provider: mike

markdown_extensions:
- admonition
Expand Down
104 changes: 103 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@ description = "Documentation for jolicode/automapper"
authors = ["Joel Wurtz <joel.wurtz@gmail.com>"]
license = "MIT"
readme = "README.md"
package-mode = false

[tool.poetry.dependencies]
python = "^3.11"
mkdocs = "^1.5.3"
mkdocs-material = "^9.5.13"
markdown-callouts = "^0.4.0"
mkdocs-literate-nav = "^0.6.1"
mike = "^2.0.0"


[build-system]
Expand Down

0 comments on commit cc97be9

Please sign in to comment.