appleboy / drone-scp

Copy files and artifacts via SSH using a binary, docker or Drone CI.
MIT License
141 stars 29 forks source link

How to ignore .git folder from source #190

Closed tarikmanoar closed 1 month ago

tarikmanoar commented 3 months ago
name: DEPLOY

on:
  push:
    branches: [master]

jobs:
  deployment:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Copy repository contents via scp
        uses: appleboy/scp-action@master
        with:
          host: ${{ secrets.HOST }}
          username: ${{ secrets.USERNAME }}
          port: ${{ secrets.PORT }}
          password: ${{ secrets.PASSWORD }}
          source: "./*,!.git/"
          target: ${{ secrets.DIR }}

This is my deploy.yml file

Here I tried to ignore `.git folder and copy all files/folder except .git

appleboy commented 1 month ago

Please update the following config

source: "./*,!.git/"

replace with

source: "*,!.git"