refactor(plantuml): plantuml render #83
This file contains hidden or 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
| name: dev-documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| env: | |
| CI_DOCKER_CACHE_PATH: ci/cache/docker | |
| # Мы хотим чтобы deploy в ветку gh-pages | |
| # происходили консистентно друг за другом | |
| concurrency: | |
| group: deploy-docs | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| name: Deploy dev documentation | |
| runs-on: ubuntu-22.04 | |
| env: | |
| RENDERER_NETWORK: renderer-net | |
| RENDERER_IMAGE: plantuml/plantuml-server:jetty-v1.2026.0 | |
| RENDERER_CONTAINER_NAME: renderer | |
| defaults: | |
| run: | |
| working-directory: documentation | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup docker image cache | |
| id: docker-image-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: ${{ env.CI_DOCKER_CACHE_PATH }} | |
| key: ${{ env.RENDERER_IMAGE }} | |
| - name: Update docker image cache | |
| if: steps.docker-image-cache.outputs.cache-hit != 'true' | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| docker pull "$RENDERER_IMAGE" | |
| mkdir -p ${CI_DOCKER_CACHE_PATH}/${RENDERER_IMAGE} | |
| docker image save -o ${CI_DOCKER_CACHE_PATH}/${RENDERER_CONTAINER_NAME}.tar "$RENDERER_IMAGE" | |
| - name: Load docker image cache | |
| if: steps.docker-image-cache.outputs.cache-hit == 'true' | |
| working-directory: ${{ github.workspace }} | |
| run: | | |
| docker image load -i ${CI_DOCKER_CACHE_PATH}/${RENDERER_CONTAINER_NAME}.tar | |
| - name: Start renderer service locally | |
| run: | | |
| docker network create "$RENDERER_NETWORK" | |
| docker run -d -p 7036:8080 --name "$RENDERER_CONTAINER_NAME" --network "$RENDERER_NETWORK" "$RENDERER_IMAGE" | |
| - name: Configure Git user | |
| run: | | |
| git config user.email "[email protected]" | |
| git config user.name "GitHub Actions" | |
| - name: Setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| cache: 'pip' | |
| - name: Download mkdocs plugins | |
| run: pip install -r requirements.txt | |
| - name: Deploy documentation into gh-pages branch | |
| run: mike deploy dev --push | |
| - name: Setup default version | |
| run: mike set-default dev --push | |
| - name: Cleanup renderer container | |
| if: always() | |
| run: | | |
| docker rm -f "$RENDERER_CONTAINER_NAME" | |
| docker network rm -f "$RENDERER_NETWORK" | |
| docker rmi -f ${RENDERER_REGISTRY}${RENDERER_IMAGE} |