openjournals / openjournals-draft-action

Experimental GitHub Action
MIT License
52 stars 12 forks source link

mapping values are not allowed in this context #16

Closed johentsch closed 1 year ago

johentsch commented 1 year ago

Hi folks,

I'm in the process of hacking my JOSS paper together. My first test paper.md compiled perfectly but now with the latest commit the action failed with the error

YAML parse exception at line 12, column 9:
mapping values are not allowed in this context

which is kind of funny because the YAML file had actually not changed since the last time when it worked. The indicated position is this one:

      - name: Build draft PDF
        uses: openjournals/openjournals-draft-action@master
        with:
        ^

Since the YML file itself has not changed, could it be due to the commit to paper.md itself? It comments out a section with <!-- --> HTML syntax, could this be the issue?

Here is the list of latest runs for inspection.

Thank you in advance!

johentsch commented 1 year ago

Update: Just removed the HTML comment from the draft but the problem persists. Here the screenshot for more context:

image

tarleb commented 1 year ago

The issue probably stems from the re-indentation of YAML in paper.md, specifically lines 13ff. Can you try again after reversing those indentation changes?

johentsch commented 1 year ago

Thank you for looking into this! That was the issue, indeed. I had gone a bit over the top with my editor's automatic reformatting :roll_eyes: Sorry for that.

andreped commented 7 months ago

For anyone ever running into this issue, I highly recommend using this open tool for checking your YAML syntax: https://yamlchecker.com

Even from the discussion above, it was not clear to me what the issue actually was and where it was coming from, but using this tool it pointed exact to where the issue was. See snapshot below:

Screenshot 2024-01-21 at 21 21 40