Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asciidoctor-chart and gnuplot support #35

Open
zakutok opened this issue Sep 3, 2022 · 0 comments
Open

asciidoctor-chart and gnuplot support #35

zakutok opened this issue Sep 3, 2022 · 0 comments

Comments

@zakutok
Copy link

zakutok commented Sep 3, 2022

I would like to use https://github.com/asciidoctor/asciidoctor-chart or gnuplot to draw charts. Could you please clarify how to make them work?

I've tried it with the config:

name: GitHub Pages Publish

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: write
  pages: write
  id-token: write

  # Allow one concurrent deployment
concurrency:
  group: "pages"
  cancel-in-progress: true

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  build_and_deploy:
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
      - uses: actions/checkout@v3

      - name: install rouge
        run: sudo apt-get install -y ruby-rouge

      - name: install gnuplot
        run: sudo apt-get install -y gnuplot

      - name: install asciidoctor-chart
        run: sudo gem install asciidoctor-chart --pre

      # Includes the AsciiDoctor GitHub Pages Action to convert adoc files to html and publish to gh-pages branch
      - name: asciidoctor-ghpages
        uses: manoelcampos/[email protected]
        with:
          pdf_build: true
          asciidoctor_params: -r asciidoctor-diagram --attribute=nofooter
          # adoc_file_ext: .ascii # default is .adoc
          # source_dir: docs/ # default is .
          # slides_build: true
          # pre_build:
          # post_build:
      - name: Setup Pages
        uses: actions/configure-pages@v2
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          # Upload entire repository
          path: '.'
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1

but it throw the error:
Could not find the 'gnuplot' executable in PATH; add it to the PATH or specify its location using the 'gnuplot' document attribute
Then I made asciidoctor_params: -r asciidoctor-diagram --attribute=nofooter a gnuplot=/usr/bin/gnuplot but it throws the same error.
So I made asciidoctor_params: -r asciidoctor-diagram -r asciidoctor-chart --attribute=nofooter -a gnuplot=/usr/bin/gnuplot but it throws asciidoctor: FAILED: 'asciidoctor-chart' could not be loaded error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant