Skip to content

Files not deleted from remote server when deleted in repo #108

@ravewebdev

Description

@ravewebdev

Describe the bug
The workflow does not delete files/folders from the server when they're deleted in the repo. This has caused builds to fail when a folder containing PHP classes was replaced with a renamed folder in the repo, with the error "PHP Fatal error: Cannot declare class..." as it detected duplicate classes, despite the fact that in the repo the classes were actually unique. To fix the issue, we had to SFTP into the server and manually delete the old files. This should not be necessary.

To reproduce

  1. Add new file, commit and push to remote.
  2. Delete that file, commit and push to remote.

The file will be deleted from the repo but not from the server.

deploy workflow for reference:

name: Develop

on:
  push:
    branches:
      - develop

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - run: |
          git fetch --prune --unshallow

    - name: GitHub Action for WP Engine Git Deployment
      uses: wpengine/github-action-wpe-site-deploy@v3
      env:
        WPE_ENV: '<dev-install>'
        WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPENGINE_SSH_KEY_PRIVATE }}

Expected behavior

Files deleted from the repo should be deleted from the server as well.

Version information

  • Action version: 3.2.6
  • Git version: 2.45.2
  • WordPress version: 6.6.2
  • Operating system: MacOS Sequoia 15.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions