Skip to content

Add workingDirectory argument#283

Merged
mre merged 2 commits into
masterfrom
working-directory
Mar 31, 2025
Merged

Add workingDirectory argument#283
mre merged 2 commits into
masterfrom
working-directory

Conversation

@mre

@mre mre commented Mar 27, 2025

Copy link
Copy Markdown
Member

Related: #205 (comment)

Usage:

- uses: lycheeverse/lychee-action@v2
  with:
    workingDirectory: fixtures/subdir

@mre mre force-pushed the working-directory branch 3 times, most recently from eca1123 to 8eac377 Compare March 27, 2025 15:21

@thomaseizinger thomaseizinger left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, thanks!

Does this affect where the output.md lands?

@mre

mre commented Mar 28, 2025

Copy link
Copy Markdown
Member Author

Good point. It will behave like a cd into the directory, so yes. We should document that.

@mre mre requested a review from thomas-zahner March 28, 2025 10:56
@mre

mre commented Mar 28, 2025

Copy link
Copy Markdown
Member Author

@Arteiii, can you also take a look and add your thoughts? 😃

@Arteiii

Arteiii commented Mar 28, 2025

Copy link
Copy Markdown
Collaborator

I'm not sure I can add anything more to this (apart from the changes to the documentation already mentioned to avoid confusion, especially regarding the output directory)

As for the other discussions in the issue (#205 (comment)), I think an option in the workflow to specify the .lycheeignore file would be great, but I'm not sure if there is any support for this in Lychee

@mre

mre commented Mar 28, 2025

Copy link
Copy Markdown
Member Author

Thanks for checking in.
At the moment, there is no support in lychee for that. I think it won't be super easy to do. It might be a can of worms I'm not willing to open for now. 😅

@Arteiii

Arteiii commented Mar 28, 2025

Copy link
Copy Markdown
Collaborator

Well, for the workflow there might be a hacky workaround by using the new workingDirectory arg

- uses: lycheeverse/lychee-action@v2
  with:
    workingDirectory: .github/workflows
    args: "--verbose --no-progress '../../**/*.md' '../../**/*.html' '../../**/*.rst'"

Not the best solution, but it should work

@mre

mre commented Mar 28, 2025

Copy link
Copy Markdown
Member Author

True, or

- uses: lycheeverse/lychee-action@v2
  with:
    workingDirectory: .github/workflows
    args: >-
      --verbose 
      --no-progress 
      '${{ github.workspace }}/**/*.md' 
      '${{ github.workspace }}/**/*.html' 
      '${{ github.workspace }}/**/*.rst'

Not sure which version I prefer.

@thomas-zahner

Copy link
Copy Markdown
Member

Looks good to me.
It's just the documentation about the modified output directory when using the argument which is still missing.

@mre mre merged commit 1d97d84 into master Mar 31, 2025
@mre mre deleted the working-directory branch March 31, 2025 12:25
@mre

mre commented Mar 31, 2025

Copy link
Copy Markdown
Member Author

Thanks for the reviews.

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

Successfully merging this pull request may close these issues.

5 participants