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

#1932 Publish v13 Docs using mike #1967

Merged
merged 19 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
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
13 changes: 9 additions & 4 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,20 @@ jobs:
working-directory: ./docs
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
# We need to additionally fetch the gh-pages branch for mike deploy
with:
python-version: 3.x
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
- run: pip3 install mkdocs-material
run: pip3 install mike
- run: mike deploy --push --update-aliases v13 latest
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,26 @@ npm install
3. Install required mkdocs packages using pip3.
```
pip3 install -r requirements.txt
pip3 install mike
```

4. Run below command to start mkdocs server.
```
4. Run below commands to use `mike` to deploy multiple versions of docs.
```sh
# Initially delete everything from gh-pages branch to start creating version folders.
mike delete --all

# If above command throws an error please run below mkdocs command and then run mike deploy
mkdocs gh-deploy --force

# This command will create a folder named as v13 in gh-pages branch.
mike deploy --push --update-aliases v13 latest
mike set-default v13


# Test changes in local.
mike serve

# If you are working on Elyra Canvas documentation content, you should run the following command, instead of the mike serve command, to see your changes immediately reflected in the browser.
mkdocs serve
```

Expand Down
2 changes: 2 additions & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ theme:
- navigation.footer

extra:
version:
provider: mike
social:
- icon: fontawesome/brands/github
link: http://github.com/elyra-ai/canvas
Expand Down
9 changes: 9 additions & 0 deletions docs/pages/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,12 @@ th {
max-width: 71rem;
}

.md-version__list {
background-color: black;
}

.md-version__link {
background-color: black;
color: white;
transition: color 0.3s ease;
}