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

allow nested paths in target-folder + add attempt-limit parameter #1737

Merged
merged 3 commits into from
Nov 24, 2024

Conversation

databasedav
Copy link
Contributor

Description

  • Adds the --mkpath flag to the rsync command to allow it to make missing directories. This is useful when many different pages are being deployed, so a deeply nested descriptive path can be specified in target-folder. Right now, doing so leads to an error in rsync complaining about missing directories.
  • Adds an attempt-limit parameter to allow more rebase/push attempts than the default of 3. This is useful when many different actions are racing to deploy many different pages.

Testing

I built this code (databasedav@ec82a36) and used it (https://github.com/databasedav/haalka/blob/18a199464edc9cf3eb3e04989b30893f970097f0/.github/workflows/preview_deploy.yaml#L21) in this PR databasedav/haalka#6. Note that the target-folder is a deeply nested path https://github.com/databasedav/haalka/pull/6/files#diff-05da7bfe214f8a02b4727e2f5970ac5b86684f522864a6917da71a3efa04ba13R27 and pushing is attempted more than 3 times https://github.com/databasedav/haalka/actions/runs/11870171025/job/33082157315#step:5:257.

One can see a deployed page here https://databasedav.github.io/haalka/pr_previews/6/webgpu/button/, note it requires a webgpu compatible browser (e.g. chrome, firefox nightly, not firefox stable) to work.

@databasedav databasedav changed the title use --mkpath in rsync + add attempt limits parameter use --mkpath in rsync + add attempt limit parameter Nov 18, 2024
@databasedav databasedav changed the title use --mkpath in rsync + add attempt limit parameter allow nested paths in target-folder + add attempt-limit parameter Nov 18, 2024
Copy link
Owner

@JamesIves JamesIves left a comment

Choose a reason for hiding this comment

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

Changes look good to me, appreciate the contribution. Left a comment but I can work on merging this later this week.

src/constants.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.54%. Comparing base (3c4f14a) to head (fbab7ab).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1737   +/-   ##
=======================================
  Coverage   93.54%   93.54%           
=======================================
  Files           7        7           
  Lines         310      310           
  Branches       85       86    +1     
=======================================
  Hits          290      290           
  Misses         18       18           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@JamesIves JamesIves merged commit 84bd015 into JamesIves:dev Nov 24, 2024
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.

2 participants