Add workingDirectory argument by mre · Pull Request #283 · lycheeverse/lychee-action (original) (raw)
mre commented
• Loading
Related: #205 (comment)
Usage:
- uses: lycheeverse/lychee-action@v2 with: workingDirectory: fixtures/subdir
mre mentioned this pull request
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?
Good point. It will behave like a cd into the directory, so yes. We should document that.
@Arteiii, can you also take a look and add your thoughts? 😃
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
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. 😅
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
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.
Looks good to me.
It's just the documentation about the modified output directory when using the argument which is still missing.
mre deleted the working-directory branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})