SamKirkland / web-deploy

Deploy your website automatically for free
MIT License
186 stars 30 forks source link

configuration example #7

Open reactmore opened 1 year ago

reactmore commented 1 year ago

My Action Config

on:
  push:
  - name: 📂 Sync Files
      uses: SamKirkland/web-deploy@v1
      with:
        target-server: ${{ secrets.server}}
        remote-user: ${{ secrets.user}}
        private-ssh-key: ${{ secrets.SSH_KEY }}
        ssh-port: ${{ secrets.port}}
        destination-path: ~/core/
        rsync-options: --delete-after --human-readable --exclude=.git* --exclude=.git/ --exclude=README.md --exclude=readme.md --exclude=.gitignore --exclude=public/uploads/*

It works when uploading to the server but rsync removes the folders vendor and .env how can these 2 things not be deleted on the server?

cskwrd commented 1 year ago

It's my understanding that the flag --delete-after will delete files at the destination (that don't exist in source) after the copy operations have been performed.

man rsync