зеркало из https://github.com/microsoft/AzureTRE.git
Docs versioning (#3138)
* Docs versioning * Fix Lint issues * Fix lint * CR changes * CR changes * CR changes * Fix lint * Fix lint * Fix lint * Cr changes
This commit is contained in:
Родитель
8f812575a6
Коммит
e0b282aee1
|
@ -1,21 +1,39 @@
|
||||||
---
|
---
|
||||||
name: Publish docs via Github Pages
|
name: Deploy Documentation
|
||||||
|
on:
|
||||||
on: # yamllint disable-line rule:truthy
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
|
||||||
paths:
|
paths:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
|
- mkdocs.yml
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
name: Deploy docs
|
name: Deploy Documentation
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout main
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: true
|
||||||
- uses: actions/setup-python@v4
|
- uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
python-version: 3.x
|
||||||
- run: pip install -r docs/requirements.txt
|
- name: Install Dependencies
|
||||||
- run: mkdocs gh-deploy --strict --force
|
run: |
|
||||||
|
pip install -r docs/requirements.txt
|
||||||
|
- name: Configure Git User
|
||||||
|
# Required by mike for the commit it does to the gh-pages branch
|
||||||
|
run: |
|
||||||
|
git config user.name "ci-docs"
|
||||||
|
git config user.email "ci-docs@dummy.com"
|
||||||
|
- name: Deploy the latest documents from new release
|
||||||
|
if: ${{ github.event_name == 'release' }}
|
||||||
|
run: mike deploy --push --update-aliases "${GITHUB_REF#refs/*/}" latest-release
|
||||||
|
- name: Deploy the development docs
|
||||||
|
if: ${{ github.event_name != 'release' }}
|
||||||
|
run: mike deploy --push develop
|
||||||
|
|
|
@ -4,3 +4,4 @@ mkdocs
|
||||||
mkdocs-material
|
mkdocs-material
|
||||||
mkdocs-material-extensions
|
mkdocs-material-extensions
|
||||||
mkdocstrings
|
mkdocstrings
|
||||||
|
mike
|
||||||
|
|
|
@ -1,5 +1,13 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block outdated %}
|
||||||
|
You're not viewing the latest version.
|
||||||
|
<a href="{{ '../' ~ base_url }}">
|
||||||
|
<strong>Click here to go to latest.</strong>
|
||||||
|
</a>
|
||||||
|
</script>
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block analytics %}
|
{% block analytics %}
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(c,l,a,r,i,t,y){
|
(function(c,l,a,r,i,t,y){
|
||||||
|
|
|
@ -22,6 +22,10 @@ theme:
|
||||||
features:
|
features:
|
||||||
- navigation.instant
|
- navigation.instant
|
||||||
- navigation.indexes
|
- navigation.indexes
|
||||||
|
extra:
|
||||||
|
version:
|
||||||
|
provider: mike
|
||||||
|
default: latest-release
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- search
|
- search
|
||||||
|
|
Загрузка…
Ссылка в новой задаче