2
0
mirror of https://github.com/linka-cloud/d2vm.git synced 2024-11-25 17:16:25 +00:00

setup documentation site build and deploy

This commit is contained in:
Adphi 2022-05-19 15:41:06 +02:00
parent 6d8a8d80f5
commit 7c12ca465a
Signed by: adphi
GPG Key ID: 46BE4062DB2397FF
15 changed files with 75 additions and 1 deletions

22
.github/workflows/docs.yaml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Docs
on:
push:
branches:
- docs
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and deploy mkdocs site
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
make build-docs
sudo chown -R ${UID}:${UID} docs
make deploy-docs

4
.gitignore vendored
View File

@ -8,6 +8,8 @@ scratch
bin/
dist/
images
wstation
/d2vm
/examples/build
.goreleaser.yaml
docs/build
docs-src

View File

@ -111,3 +111,26 @@ examples: build-dev
cli-docs: .build
@rm -rf $(CLI_REFERENCE_PATH)
@./d2vm docs $(CLI_REFERENCE_PATH)
serve-docs:
@docker run --rm -i -t --user=$(UID) -p 8000:8000 -v $(PWD):/docs linkacloud/mkdocs-material serve -f /docs/docs/mkdocs.yml -a 0.0.0.0:8000
.PHONY: build-docs
build-docs: clean-docs cli-docs
@docker run --rm -v $(PWD):/docs linkacloud/mkdocs-material build -f /docs/docs/mkdocs.yml -d build
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
GITHUB_PAGES_BRANCH := gh-pages
deploy-docs:
@git branch -D gh-pages &> /dev/null || true
@git checkout -b $(GITHUB_PAGES_BRANCH)
@rm .gitignore && mv docs docs-src && mv docs-src/build docs && rm -rf docs-src
@git add . && git commit -m "build docs" && git push origin --force $(GITHUB_PAGES_BRANCH)
@git checkout $(GIT_BRANCH)
docs: cli-docs build-docs deploy-docs
clean-docs:
@rm -rf docs/build

BIN
docs/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 66 56" fill="#fff" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-linejoin="round"><use xlink:href="#A" x=".5" y=".5"/><symbol id="A" overflow="visible"><g stroke="none" fill-rule="nonzero"><path d="M49.46 37.36h-5.32c-.178 0-.323-.145-.323-.323V26.06l-.074-1.808c-.047-.53-.173-.992-.376-1.376a2.2 2.2 0 0 0-.868-.883c-.38-.22-.93-.332-1.62-.332s-1.238.13-1.647.382-.743.597-.976 1a4.21 4.21 0 0 0-.486 1.462c-.085.567-.128 1.15-.128 1.732v10.8c0 .178-.145.323-.323.323H32c-.178 0-.323-.145-.323-.323V26.18l-.037-1.7c-.024-.524-.124-1.013-.297-1.45-.164-.415-.43-.74-.814-.992s-.972-.378-1.752-.378c-.22 0-.527.053-.908.157-.368.1-.732.294-1.08.577s-.65.694-.904 1.235-.382 1.27-.382 2.167v11.24c0 .178-.144.323-.323.323h-5.32c-.178 0-.323-.145-.323-.323v-19.37c0-.178.145-.322.323-.322h5.02c.178 0 .323.145.323.322v1.794c.618-.726 1.33-1.315 2.125-1.757 1.032-.574 2.225-.865 3.548-.865 1.265 0 2.44.25 3.5.743.934.44 1.68 1.17 2.224 2.18.556-.703 1.263-1.34 2.108-1.895 1.036-.682 2.274-1.028 3.68-1.028 1.048 0 2.036.13 2.937.387.917.263 1.715.7 2.373 1.267s1.18 1.348 1.548 2.278c.363.922.547 2.04.547 3.323v12.964c0 .178-.145.323-.323.323z" opacity=".5"/><path d="M24.88 17.675v2.623h.075c.7-.998 1.542-1.774 2.53-2.323s2.117-.824 3.39-.824c1.224 0 2.342.238 3.353.712s1.78 1.31 2.305 2.51c.574-.85 1.355-1.6 2.342-2.248s2.154-.974 3.504-.974c1.024 0 1.973.125 2.848.375s1.623.65 2.248 1.2 1.11 1.268 1.462 2.154.525 1.955.525 3.204v12.964h-5.32V26.07l-.075-1.836c-.05-.574-.187-1.073-.412-1.5s-.556-.762-.993-1.012-1.03-.374-1.78-.374-1.355.145-1.817.43a3.12 3.12 0 0 0-1.087 1.124c-.263.461-.437.987-.524 1.574s-.132 1.184-.131 1.78v10.79H32V26.182l-.037-1.705c-.025-.562-.13-1.08-.32-1.556s-.5-.855-.937-1.143-1.08-.43-1.93-.43c-.25 0-.58.056-.993.17a3.3 3.3 0 0 0-1.199.637c-.388.313-.718.762-.993 1.35s-.412 1.355-.412 2.304v11.24h-5.32V17.675z" opacity=".5"/><path d="M1.432 1.244v51.833h3.73v1.244H0V0h5.162v1.243zm20.788 16.43v2.623h.075c.7-.998 1.542-1.774 2.53-2.323s2.117-.824 3.4-.824c1.224 0 2.342.238 3.353.712s1.78 1.3 2.305 2.5c.574-.85 1.355-1.6 2.342-2.248s2.154-.974 3.504-.974c1.024 0 1.973.125 2.848.375s1.623.65 2.248 1.2 1.1 1.268 1.462 2.154.525 1.955.525 3.204v12.964h-5.32V26.06l-.075-1.836c-.05-.574-.187-1.073-.412-1.5s-.556-.762-.993-1.012-1.03-.374-1.78-.374-1.355.145-1.817.43a3.12 3.12 0 0 0-1.087 1.124c-.263.46-.437.987-.524 1.574s-.132 1.184-.131 1.78v10.8h-5.32V26.182l-.037-1.705c-.025-.562-.13-1.08-.32-1.556s-.5-.855-.937-1.143-1.08-.43-1.93-.43c-.25 0-.58.056-.993.17a3.3 3.3 0 0 0-1.199.637c-.388.313-.718.762-.993 1.35s-.412 1.355-.412 2.304v11.24H17.2V17.675zm40.348 35.402V1.244h-3.73V0H64v54.32h-5.162v-1.244z" fill="#000"/></g></symbol></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -0,0 +1 @@
../../examples/full/README.md

1
docs/content/index.md Symbolic link
View File

@ -0,0 +1 @@
../../README.md

24
docs/mkdocs.yml Executable file
View File

@ -0,0 +1,24 @@
site_name: ""
docs_dir: content
site_dir: build
theme:
name: linka-cloud
logo: assets/d2vm-light-tr.png
favicon: assets/d2vm-favicon.png
language: en
repo_url: https://github.com/linka-cloud/d2vm
copyright: Copyright &copy; 2022 Linka Cloud
extra:
homepage: https://github.com/linka-cloud/d2vm
social:
- icon: fontawesome/brands/github
link: https://github.com/linka-cloud
- icon: fontawesome/brands/docker
link: https://hub.docker.com/r/linkacloud
markdown_extensions:
- pymdownx.highlight:
use_pygments: true
- pymdownx.superfences
- pymdownx.tasklist