diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 000000000..2d369559f --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,24 @@ +name: Build Docs +on: + workflow_dispatch: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + # this fetches all branches. Needed because we need gh-pages branch for deploy to work + fetch-depth: 0 + - uses: actions/setup-python@v2 + with: + python-version: '3.9' + - name: Install MkDocs + run: pip install -r docs/doc_requirements.txt + - name: Publish docs + run: | + git config user.name github-actions + git config user.email github-actions@github.com + mkdocs gh-deploy --force --clean --verbose diff --git a/docs/contributing/documentation.md b/docs/contributing/documentation.md new file mode 100644 index 000000000..d105399ee --- /dev/null +++ b/docs/contributing/documentation.md @@ -0,0 +1,21 @@ +Contributing to documentation +============================= + +## Rendering documentation locally + +Install docs build requirements into virtualenv: + +``` +python3 -m venv local/docs-venv +source local/docs-venv/bin/activate +pip install -r docs/doc_requirements.txt +``` + +Serve docs site on localhost: + +``` +mkdocs serve +``` + +Click the link it outputs. As you save changes to files modified in your editor, +the browser will automatically show the new content. diff --git a/docs/doc_requirements.txt b/docs/doc_requirements.txt new file mode 100644 index 000000000..9fda071a6 --- /dev/null +++ b/docs/doc_requirements.txt @@ -0,0 +1,4 @@ +mkdocs +mike +mkdocs-git-revision-date-plugin +mkdocs-material diff --git a/docs/images/openstack-logo.png b/docs/images/openstack-logo.png new file mode 100644 index 000000000..b3bce0369 Binary files /dev/null and b/docs/images/openstack-logo.png differ diff --git a/docs/index.md b/docs/index.md new file mode 120000 index 000000000..62869bebd --- /dev/null +++ b/docs/index.md @@ -0,0 +1 @@ +../validated_arch_1/README.md \ No newline at end of file diff --git a/docs/stage1.md b/docs/stage1.md new file mode 120000 index 000000000..8682486b8 --- /dev/null +++ b/docs/stage1.md @@ -0,0 +1 @@ +../validated_arch_1/stage1/README.md \ No newline at end of file diff --git a/docs/stage2.md b/docs/stage2.md new file mode 120000 index 000000000..782c1d1a3 --- /dev/null +++ b/docs/stage2.md @@ -0,0 +1 @@ +../validated_arch_1/stage2/README.md \ No newline at end of file diff --git a/docs/stage3.md b/docs/stage3.md new file mode 120000 index 000000000..e40b596ad --- /dev/null +++ b/docs/stage3.md @@ -0,0 +1 @@ +../validated_arch_1/stage3/README.md \ No newline at end of file diff --git a/docs/stage4.md b/docs/stage4.md new file mode 120000 index 000000000..033b8ceab --- /dev/null +++ b/docs/stage4.md @@ -0,0 +1 @@ +../validated_arch_1/stage4/README.md \ No newline at end of file diff --git a/docs/stage5.md b/docs/stage5.md new file mode 120000 index 000000000..ff46b57d6 --- /dev/null +++ b/docs/stage5.md @@ -0,0 +1 @@ +../validated_arch_1/stage5/README.md \ No newline at end of file diff --git a/docs/stage6.md b/docs/stage6.md new file mode 120000 index 000000000..273714b84 --- /dev/null +++ b/docs/stage6.md @@ -0,0 +1 @@ +../validated_arch_1/stage6/README.md \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 000000000..0dc5358df --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,51 @@ +site_name: OpenStack K8S Operators Architectures +site_description: OpenStack K8S Operators Architectures +site_author: OpenStack Team +site_url: https://openstack-k8s-operators.github.io/architecture +repo_name: openstack-k8s-operators/architecture +repo_url: https://github.com/openstack-k8s-operators/architecture +theme: + features: + - search.suggest + - search.highlight + - search.share + name: material + logo: images/openstack-logo.png + palette: + - scheme: default + media: "(prefers-color-scheme: light)" + primary: teal + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + - scheme: slate + media: "(prefers-color-scheme: dark)" + primary: teal + toggle: + icon: material/toggle-switch + name: Switch to light mode +nav: + - Overview: index.md + - Stages: + - stage1.md + - stage2.md + - stage3.md + - stage4.md + - stage5.md + - stage6.md + - Contributing: + - contributing/documentation.md +markdown_extensions: + - toc: + permalink: "#" + - pymdownx.superfences + - admonition +extra: + version: + provider: mike + default: latest +plugins: + - git-revision-date + - search: + lang: en + prebuild_index: true