Skip to content

Commit 6e27bb0

Browse files
committed
ci: mirror the remote on deploy instead of fast forwarding
1 parent 6295734 commit 6e27bb0

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
group: check-${{ github.ref }}
1414
cancel-in-progress: true
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717

1818
- name: Install dependencies
1919
run: |
@@ -49,7 +49,11 @@ jobs:
4949
run: |
5050
set -e
5151
cd /srv/apps/blueva-menu
52-
git pull --ff-only
52+
# Mirror the remote rather than merge into it: a deploy checkout has
53+
# nothing worth keeping, and a rewritten history makes a fast-forward
54+
# impossible. Ignored files (.env, vendor, public/build) are untouched.
55+
git fetch origin main
56+
git reset --hard origin/main
5357
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
5458
npm ci
5559
npm run build

0 commit comments

Comments
 (0)