appleboy / drone-scp

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

How to ignore .git folder from source #190

Closed tarikmanoar closed 5 months ago

tarikmanoar commented 7 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 5 months ago

Please update the following config

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

replace with

source: "*,!.git"