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

Advice needed for github action #92

Open
jharrell opened this issue Apr 28, 2024 · 0 comments
Open

Advice needed for github action #92

jharrell opened this issue Apr 28, 2024 · 0 comments

Comments

@jharrell
Copy link

Hi there! I apologize for the vague title.

I'm quite new to the remark ecosystem and am trying to implement this GitHub Action into the prisma docs repo here: prisma/docs#5956

I've set up the action like so:

  remark-lint:
    name: runner / remark-lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 18
      - name: install remark presets
        run: npm install remark-lint-no-dead-urls
        shell: bash
      - name: remark-lint
        uses: reviewdog/action-remark-lint@v5
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          reporter: github-pr-check
          remark_args: '-qf -e=md,mdx --use=remark-mdx --use remark-frontmatter --use remark-gfm --use remark-lint-no-dead-urls=skipLocalhost:true,skipUrlPatterns:["https://www.notion.so/prismaio","https://www.prisma.io/docs","https://dash.cloudflare.com","https://www.cloudflare.com"]'

I've been having a bit of trouble, with errors like the following:

1:1  error  TypeError: Cannot read properties of undefined (reading 'inTable')
1:1  error  TypeError: Cannot read properties of undefined (reading 'mdxJsxTagStack')

I've done some digging and it looks like this might have something to do with mismatched versions of packages within the remark ecosystem. So, I also tried running remark-cli directly via a github action like so

       - name: run remark-cli
         run: |
           npx remark-cli . -qf -e=md,mdx --use=remark-mdx --use remark-frontmatter --use remark-gfm \
           --use 'remark-lint-no-dead-urls=skipLocalhost:true,skipUrlPatterns:["https://www.notion.so/prismaio","https://www.prisma.io/docs","https://dash.cloudflare.com","https://www.cloudflare.com"]'

and everything worked like I would expect.

Is there anything horribly obvious I'm missing? Any recommendations you'd have?

Thank you for your time!

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