peter-evans / link-checker

A GitHub action for link checking repository Markdown and HTML files
MIT License
49 stars 11 forks source link

Define the Liche Document Root #32

Closed praneesha closed 4 years ago

praneesha commented 4 years ago

@peter-evans - I have configured the Link Checker as follows.

on: [push]
name: Link Checker Example Command
jobs:
  linkChecker:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Link Checker
        id: lc
        uses: peter-evans/link-checker@v1
        with:
          args: -r learn swan-lake 1.1 1.0 -x 0.990 -d /ballerina-dev-website/ 
      - name: Archive production artifacts
        uses: actions/upload-artifact@v2
        with:
          name: Link Checker Report
          path:  ./link-checker/out.md

However, the links that already available also get listed as no such file or directory as shown below.

Screenshot 2020-10-28 at 14 59 14

How do I define the root directory -dcorrectly for absolute paths in the Liche arguments?

peter-evans commented 4 years ago

Hi @praneesha

I think this might work:

      - name: Link Checker
        id: lc
        uses: peter-evans/link-checker@v1
        with:
          args: -r learn swan-lake 1.1 1.0 -x 0.990 -d ${{ github.workspace }}
praneesha commented 4 years ago

@peter-evans - Thanks for the help! Still the issue prevails now with the Stat URL being appended with an unnecessary /home/runner/work/ballerina-dev-website/ part for all the links as shown below.

Screenshot 2020-10-29 at 10 52 04

The logs of the GitHub Action also gives this as the working repository incorrectly.

Screenshot 2020-10-29 at 11 17 06
praneesha commented 4 years ago

Closing since I was able to get this resolved.

c-martinez commented 3 years ago

Hi @peter-evans,

I ran into a similar issue and tried your proposed solution (using -d ${{ github.workspace }}), but was still not working. I tried this instead:

      - name: Link Checker
        id: lc
        uses: peter-evans/link-checker@v1
        with:
          args: -r -d /github/workspace

I think when the docker run is started, it is doing something like -v "${{ github.workspace }}":"/github/workspace", so the repo files end up in /github/workspace inside the docker image.