Fix CI: reset --hard + clean to repair stale submodule state
Some checks failed
Deploy to NAS / deploy (push) Failing after 26s
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:
@@ -15,7 +15,9 @@ jobs:
|
||||
- name: Pull code
|
||||
run: |
|
||||
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
|
||||
git clone http://192.168.1.4:3000/christoph/pamietnik.git ${{ vars.DEPLOY_DIR }}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user