-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up versioning with mkdocs (#850)
- Loading branch information
Showing
3 changed files
with
27 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,12 +11,17 @@ jobs: | |
steps: | ||
- name: Checkout main | ||
uses: actions/checkout@v2 | ||
|
||
- name: Deploy docs | ||
uses: mhausenblas/mkdocs-deploy-gh-pages@master | ||
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
CONFIG_FILE: documentation/mkdocs.yml | ||
EXTRA_PACKAGES: build-base | ||
REQUIREMENTS: documentation/requirements.txt | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- run: | | ||
cd documentation | ||
pip install -r requirements.txt | ||
git config user.name docs && git config user.email [email protected] | ||
git fetch origin gh-pages --depth=1 | ||
if [ ${{ github.ref }} == 'refs/heads/master' ] | ||
then | ||
mike deploy latest --push | ||
else | ||
mike deploy dev --push | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,12 @@ theme: | |
name: Switch to light mode | ||
plugins: | ||
- swagger-ui-tag | ||
- mike: | ||
# These fields are all optional; the defaults are as below... | ||
canonical_version: null | ||
version_selector: true | ||
css_dir: css | ||
javascript_dir: js | ||
nav: | ||
- Home: index.md | ||
- Setup: | ||
|
@@ -59,3 +65,7 @@ markdown_extensions: | |
extra_javascript: | ||
- https://unpkg.com/[email protected]/dist/tablesort.min.js | ||
- javascripts/tablesort.js | ||
extra: | ||
version: | ||
default: latest | ||
provider: mike |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
mkdocs-swagger-ui-tag==0.3.0 | ||
mkdocs | ||
mkdocs-material | ||
mike |