Skip to content

Instantly share code, notes, and snippets.

@jnbdz
Created March 4, 2024 21:48
Show Gist options
  • Save jnbdz/52404692174aaef8557401d68813ebdb to your computer and use it in GitHub Desktop.
Save jnbdz/52404692174aaef8557401d68813ebdb to your computer and use it in GitHub Desktop.
name: Convert drawio to Image
on:
push:
paths:
- '**/*.drawio'
jobs:
convert:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install drawio-batch
run: npm install -g drawio-batch
- name: Convert .drawio to PNG
run: drawio-batch my-diagram.drawio my-diagram.png
- name: Commit and Push Changes
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add .
git commit -m "Convert .drawio to PNG"
git push
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment