Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@ jobs:
steps:
- name: Git checkout
run: |
COMMIT="${{ github.sha }}"
EXCLUDES="-e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist' -e 'miniapps/*/dist'"
if [ ! -d ".git" ]; then
git clone https://github.com/${{ github.repository }}.git .
git clone --depth=1 https://github.com/${{ github.repository }}.git .
git fetch origin $COMMIT --depth=1 --tags
git checkout -f $COMMIT
else
# Self-hosted runners keep the workspace between runs; ensure clean checkout
# Preserve caches and build artifacts for faster builds
git reset --hard HEAD
git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist'
git fetch origin $COMMIT --depth=1 --tags
git checkout -f $COMMIT
eval "git clean -fdx $EXCLUDES"
fi
git fetch origin ${{ github.sha }} --depth=1 --tags
git checkout -f ${{ github.sha }}
git reset --hard HEAD
git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist'

- name: Determine channel
id: channel
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ jobs:
steps:
- name: Git checkout
run: |
COMMIT="${{ github.event.pull_request.head.sha || github.sha }}"
EXCLUDES="-e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist' -e 'miniapps/*/dist'"
if [ ! -d ".git" ]; then
git clone --depth=1 https://github.com/${{ github.repository }}.git .
git fetch origin $COMMIT --depth=1
git checkout -f $COMMIT
else
# Self-hosted runners keep the workspace between runs; ensure clean checkout
# Preserve caches and build artifacts for faster builds
git reset --hard HEAD
git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist'
git fetch origin $COMMIT --depth=1
git checkout -f $COMMIT
eval "git clean -fdx $EXCLUDES"
fi
git fetch origin ${{ github.event.pull_request.head.sha || github.sha }} --depth=1
git checkout -f ${{ github.event.pull_request.head.sha || github.sha }}
git reset --hard HEAD
git clean -fdx -e .turbo -e '**/.turbo' -e node_modules -e '**/node_modules' -e 'packages/*/dist'

- name: Detect changes
id: changes
Expand Down