ansys / actions

A collection of reusable workflows
https://actions.docs.ansys.com/
MIT License
10 stars 5 forks source link

fix: only compress content inside html folder #507

Closed RobPasMue closed 2 months ago

RobPasMue commented 2 months ago

Current Windows implementation was zipping the entire "doc/build..." folder structure. We are only interested in the contents inside the "html" folder

ansys-reviewer-bot[bot] commented 2 months ago

Thanks for opening a Pull Request. If you want to perform a review write a comment saying:

@ansys-reviewer-bot review

RobPasMue commented 2 months ago

Requesting specific review from @SMoraisAnsys

RobPasMue commented 2 months ago

LGTM, thanks for noticing this behavior ! I think we could also use Compress-Archive -Path ${{ env.EXPECTED_BUILD_DIR }}\html\* -DestinationPath documentation-html.zip but you solutions works fine !

I tried to be as little invasive as possible with my change - I figured that if you used "zip" directly it was for a reason. Honestly, I'd even delegate all this to the zip action we typically use https://github.com/vimtor/action-zip

SMoraisAnsys commented 2 months ago

LGTM, thanks for noticing this behavior ! I think we could also use Compress-Archive -Path ${{ env.EXPECTED_BUILD_DIR }}\html\* -DestinationPath documentation-html.zip but you solutions works fine !

I tried to be as little invasive as possible with my change - I figured that if you used "zip" directly it was for a reason. Honestly, I'd even delegate all this to the zip action we typically use https://github.com/vimtor/action-zip

I saw zip being used in other actions and/or repos so I went for it. I would also have used https://github.com/vimtor/action-zip otherwise :')