-
When using mike for versioning, what should the github actions workflow look like? I couldn't find this documented anywhere. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I have no example, since we're not using it for the official docs, but you could just search on GitHub for something like Feel free to come back here and share your final GitHub Actions workflow. |
Beta Was this translation helpful? Give feedback.
-
I ended up figuring it out and using the below CI files: Develop Docs - Updates on every push to which ever branch contains the latest development, in my case that's main. name: Build/Publish Develop Docs
on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.10.6
- name: Install Dependencies
run: |
pip install mkdocs-material
pip install pillow cairosvg mike
- name: Setup Docs Deploy
run: |
git config --global user.name "Docs Deploy"
git config --global user.email "[email protected]"
- name: Build Docs Website
run: mike deploy --push develop Release Docs - Creates the permanent docs for each release: name: Build/Publish Latest Release Docs
on:
release:
types: [published]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.10.6
- name: Install Dependencies
run: |
pip install mkdocs-material
pip install pillow cairosvg mike
- name: Setup Docs Deploy
run: |
git config --global user.name "Docs Deploy"
git config --global user.email "[email protected]"
- name: Build Docs Website
run: mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest |
Beta Was this translation helpful? Give feedback.
-
Something I do wonder about the solution provided is... What about defining the default alias/version? Is that a necessary step or is mike recognizing "dev" or "latest" as default branches? |
Beta Was this translation helpful? Give feedback.
I ended up figuring it out and using the below CI files:
Develop Docs - Updates on every push to which ever branch contains the latest development, in my case that's main.