Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
robbymilo committed Nov 28, 2024
1 parent 212ba58 commit f495584
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,13 @@ jobs:
sparse-checkout: |
deploy-preview
# sparse checkout with cone mode disabled includes root files
# sparse checkout with cone mode disabled includes root files, even when using exclusions
# see https://github.com/actions/checkout/issues/1430#issuecomment-1756326892
- name: Keep only necessary files
if: github.event.action == 'opened' || github.event.action == 'synchronize'
shell: bash
run: |
pwd
ls -al
trimmed_value=$(echo "${{ inputs.source_directory }}" | cut -d'/' -f1)
ls -al $trimmed_value
find . -mindepth 1 -not \( -path "./$trimmed_value" -o -path "./$trimmed_value/*" -o -path "./deploy-preview-files" -o -path "./deploy-preview-files/*" \) -exec rm -rf {} +
ls -al
ls -al $trimmed_value
Expand Down

0 comments on commit f495584

Please sign in to comment.