Fix CI: reset --hard + clean to repair stale submodule state
Some checks failed
Deploy to NAS / deploy (push) Failing after 26s

git pull alone doesn't convert a leftover submodule directory to a
regular directory. reset --hard + clean -fd ensures the working tree
matches origin/main exactly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Christoph K.
2026-04-08 08:10:50 +02:00
parent 4d7ff23457
commit c8cd971f49

View File

@@ -15,7 +15,9 @@ jobs:
- name: Pull code - name: Pull code
run: | run: |
if [ -d "${{ vars.DEPLOY_DIR }}/.git" ]; then if [ -d "${{ vars.DEPLOY_DIR }}/.git" ]; then
git -C ${{ vars.DEPLOY_DIR }} pull git -C ${{ vars.DEPLOY_DIR }} fetch origin main
git -C ${{ vars.DEPLOY_DIR }} reset --hard origin/main
git -C ${{ vars.DEPLOY_DIR }} clean -fd
else else
git clone http://192.168.1.4:3000/christoph/pamietnik.git ${{ vars.DEPLOY_DIR }} git clone http://192.168.1.4:3000/christoph/pamietnik.git ${{ vars.DEPLOY_DIR }}
fi fi