logseq-publish-excalidraw-t.../action.yml

26 lines
990 B
YAML
Raw Normal View History

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