LukeCarrier / mkdocs-drawio-exporter

Exports your Draw.io diagrams at build time for easier embedding into your documentation
https://pypi.org/project/mkdocs-drawio-exporter/
MIT License
77 stars 8 forks source link

Does not work github pages #25

Closed ErliSoares closed 3 years ago

ErliSoares commented 3 years ago

Continues processing but does not generate the output svg, displays the message below in the log.

ERROR    -  Export failed with exit status -6; skipping copy
The futex facility returned an unexpected error code.

image

ci.yml

name: ci 
on:
  push:
    branches: 
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        drawio-version: [14.5.1]
        python-version: [3.9]
        drawio-arch: [amd64]
        drawio-sha256sum: [0cabdf1e9a051fc38672a9233b1b2d5368d2a776fe3d3f5e09a823278b899976]
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.x
      - name: Install Draw.io Desktop
        run: |
            set -euo pipefail
            drawio_deb="drawio-${{ matrix.drawio-arch }}-${{ matrix.drawio-version }}.deb"
            drawio_url="https://github.com/jgraph/drawio-desktop/releases/download/v${{ matrix.drawio-version }}/drawio-${{ matrix.drawio-arch }}-${{ matrix.drawio-version }}.deb"
            curl -L -o "$drawio_deb" "$drawio_url"
            sha256sum --check <<<"${{ matrix.drawio-sha256sum }}  $drawio_deb"
            sudo apt-get install -y libasound2 xvfb ./"$drawio_deb"
      - run: pip install mkdocs-drawio-exporter
      - run: pip install mkdocs-minify-plugin
      - run: mkdocs gh-deploy --force

Any suggestions on how to solve?

ErliSoares commented 3 years ago

After a few hours of racking my brain I managed to

name: ci 
on:
  push:
    branches: 
      - main
jobs:
  deploy:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        drawio-version: [14.6.13]
        python-version: [3.9]
        drawio-arch: [amd64]
        drawio-sha256sum: [ebcbf92f592998597aff4ff7dd04a1e9b99c11f9c7f70f59ee5020d2497cf910]
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v2
        with:
          python-version: 3.x
      - name: Install Draw.io Desktop (Linux)
        run: |
            set -euo pipefail
            drawio_deb="drawio-${{ matrix.drawio-arch }}-${{ matrix.drawio-version }}.deb"
            drawio_url="https://github.com/jgraph/drawio-desktop/releases/download/v${{ matrix.drawio-version }}/drawio-${{ matrix.drawio-arch }}-${{ matrix.drawio-version }}.deb"
            curl -L -o "$drawio_deb" "$drawio_url"
            sha256sum --check <<<"${{ matrix.drawio-sha256sum }}  $drawio_deb"
            sudo apt-get update
            sudo apt-get install -y libappindicator3-1 libatspi2.0-0 libasound2 libgconf-2-4 libgtk-3-0 libnotify4 libnss3 libsecret-1-0 libxss1 libxtst6 libgbm-dev wget xdg-utils xvfb
            sudo apt-get install ./"$drawio_deb"
      - run: pip install mkdocs-drawio-exporter
      ...
      - run: echo $'#!/usr/bin/env bash\nxvfb-run -a /opt/drawio/drawio "${@}"' > /usr/local/bin/drawio && chmod +x /usr/local/bin/drawio
      - run: ENABLE_PDF_EXPORT=1 mkdocs gh-deploy --force