logseq-publish-excalidraw-t.../action.yml
2023-10-17 01:44:10 +00:00

28 lines
1.0 KiB
YAML

name: Logseq Excalidraw to SVG
description: Converts excalidraw to svg references
inputs:
dark-mode:
description: If drawings should be exported in dark mode
required: false
default: 'false'
runs:
using: composite
steps:
- name: Start containers
run: docker-compose -f "${{ github.action_path }}/docker-compose.yml" up -d --build
shell: bash
- run: ${{ github.action_path }}/wait_for_kroki.sh
shell: bash
- name: Creating SVG files
run: find "${{ github.workspace }}" -type f -name '*.excalidraw' -exec bash "${{ github.action_path }}/to_svg.sh" "{}" ${{ inputs.dark-mode == 'true' }} ";"
shell: bash
- name: Replace excalidraw file references
run: find "${{ github.workspace }}" -type f -name '*.md' -exec sed -ri 's|\[\[(.*\.excalidraw)\]\]|![\1](\1.csv)|g' "{}" ";"
shell: bash
- name: Debug - Setup upterm session
uses: lhotari/action-upterm@v1
- name: Stop containers
run: docker-compose -f "${{ github.action_path }}/docker-compose.yml" down
shell: bash