add svgs to assets/autogen
This commit is contained in:
parent
d3f573b4af
commit
9518372418
@ -17,7 +17,7 @@ runs:
|
|||||||
run: find "${{ github.workspace }}" -type f -name '*.excalidraw' -exec bash "${{ github.action_path }}/to_svg.sh" "{}" ${{ inputs.dark-mode == 'true' }} ";"
|
run: find "${{ github.workspace }}" -type f -name '*.excalidraw' -exec bash "${{ github.action_path }}/to_svg.sh" "{}" ${{ inputs.dark-mode == 'true' }} ";"
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Replace excalidraw file references
|
- name: Replace excalidraw file references
|
||||||
run: find "${{ github.workspace }}" -type f -name '*.md' -exec sed -ri 's|\[\[(.*\.excalidraw)\]\]|![\1](\1.svg)|g' "{}" ";"
|
run: find "${{ github.workspace }}" -type f -name '*.md' -exec sed -ri 's|\[\[(.*\.excalidraw)\]\]|![\1](assets/autogen/\1.svg)|g' "{}" ";"
|
||||||
shell: bash
|
shell: bash
|
||||||
- name: Stop containers
|
- name: Stop containers
|
||||||
run: docker-compose -f "${{ github.action_path }}/docker-compose.yml" down
|
run: docker-compose -f "${{ github.action_path }}/docker-compose.yml" down
|
||||||
|
@ -3,4 +3,5 @@ EXCALIDRAW="$(jq '{"type": .type, "version": .version, "source": .source, "eleme
|
|||||||
ENCODED="$(echo $EXCALIDRAW | python -c "import sys; import base64; import zlib; print(base64.urlsafe_b64encode(zlib.compress(sys.stdin.read().encode('utf-8'), 9)).decode('ascii'))")"
|
ENCODED="$(echo $EXCALIDRAW | python -c "import sys; import base64; import zlib; print(base64.urlsafe_b64encode(zlib.compress(sys.stdin.read().encode('utf-8'), 9)).decode('ascii'))")"
|
||||||
echo ::debug::'$ENCODED' "$ENCODED"
|
echo ::debug::'$ENCODED' "$ENCODED"
|
||||||
docker ps
|
docker ps
|
||||||
curl "localhost:8080/excalidraw/svg/$ENCODED" > "$1.svg"
|
mkdir -p "assets/autogen/$(dirname $1)"
|
||||||
|
curl "localhost:8080/excalidraw/svg/$ENCODED" > "assets/autogen/$1.svg"
|
||||||
|
Loading…
Reference in New Issue
Block a user