ammaraskar / sphinx-action

Github action that builds docs using sphinx and places errors inline
Apache License 2.0
189 stars 114 forks source link

How can i use environment #19

Closed zhaoweiguo closed 3 years ago

zhaoweiguo commented 3 years ago

I tried

    - name: Sphinx Build
      uses: ammaraskar/sphinx-action@master
      with:
        docs-folder: "source/"
        pre-build-command: "apt-get update -y && mkdir -p /usr/share/man/man1 && apt-get install -y plantuml"
        build-command: "PLANTUML_JAR=/usr/share/plantuml/plantuml.jar && sphinx-build -b html . _build"

or

        pre-build-command: "export apt-get update -y && mkdir -p /usr/share/man/man1 && apt-get install -y plantuml"

or

        build-command: "export PLANTUML_JAR=/usr/share/plantuml/plantuml.jar && sphinx-build -b html . _build"

I use in conf.py like:

plantuml = "java -DPLANTUML_LIMIT_SIZE=24384 -jar "+ os.environ.get("PLANTUML_JAR")
zhaoweiguo commented 3 years ago

These are all not work.

I need do this because:

  1. in Debain: plantuml.jar is in /usr/share/plantuml folder
  2. But in Mac: plantuml.jar can't put it in this folder
pchtsp commented 3 years ago

check this page: https://docs.github.com/en/actions/reference/environment-variables