Skip to content

Bug Fix: Address git clone Error in Deployment Workflows#61

Merged
cabutlermit merged 1 commit into
mainfrom
workflow-fix-2
Jun 25, 2025
Merged

Bug Fix: Address git clone Error in Deployment Workflows#61
cabutlermit merged 1 commit into
mainfrom
workflow-fix-2

Conversation

@cabutlermit

@cabutlermit cabutlermit commented Jun 25, 2025

Copy link
Copy Markdown
Contributor

Developer

  • Add a step at the start of the deployment workflows to ensure the directory for the git clone command is empty

Tickets affected

Version (see config/theme.ini)

  • [n/a] The theme's version number has been incremented, setting up a production
    deploy.

Documentation

  • Project documentation has been updated.
  • No documentation changes are needed.

Accessibility

  • ANDI or WAVE has been run in accordance to our guide.
  • New flagged issues not already resolved in this PR have been ticketed
    (link in the Pull Request details above).
  • This PR contains no changes to the view layer.

Stakeholder approval

  • Stakeholder approval has been confirmed (see ticket).
  • Stakeholder approval will happen retroactively.
  • Stakeholder approval is not needed.

Dependencies

  • New dependencies have been added
  • Dependencies have been updated
  • No dependencies have changed

Additional context needed to review

E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
  • New dependencies are appropriate or there were no changes.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.

Why these changes are being introduced:
The last fix was an incomplete fix since I assumed that the runner
environment was transient. But, with a self-hosted runner, the
file/folder structure remains in place after each run. That resulted
in the `git clone` step failing the second time the action ran since
there were already files in the target directory.

How this addresses that need:
* Add an `rm` step at the start of each of the three deployment
workflows to remove the "repo" directory before the `git clone` command
runs to the pull the latest commit into the folder

Side effects of this change:
None.

Relevant ticket(s):
* https://mitlibraries.atlassian.net/browse/IN-1327
@cabutlermit cabutlermit marked this pull request as ready for review June 25, 2025 17:45
@cabutlermit cabutlermit requested review from a team as code owners June 25, 2025 17:45
@matt-bernhardt matt-bernhardt self-assigned this Jun 25, 2025

@matt-bernhardt matt-bernhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was able to run the dev workflow successfully (as it looks like you did too), and this seems to address the problem we saw earlier in the workflow. :shipit:

@tim-rix tim-rix 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.

Everything looks OK to me

@cabutlermit cabutlermit merged commit ab2464b into main Jun 25, 2025
6 checks passed
@cabutlermit cabutlermit deleted the workflow-fix-2 branch June 25, 2025 18:04
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.

3 participants