Skip to content

Can't copy content inside directory #59

Description

@jd-solanki

Hi,

Thanks for this great action. I tried scp-action and it is working really well except, I want to upload whole content inside the directory and if I try it using below yml it isn't working:

  deploy:
    needs: build
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2

    - name: Download artifacts from build
      uses: actions/download-artifact@v2
      with:
        name: distdir
        path: documentation
        
    - name: List current dir after download
      shell: bash
      run: ls
      
    - name: List documentation content after download
      shell: bash
      run: ls documentation

    - name: Upload dist content via scp
      uses: appleboy/scp-action@master
      env:
        HOST: ${{ secrets.HOST }}
        USERNAME: ${{ secrets.USERNAME }}
        PORT: ${{ secrets.PORT }}
        KEY: ${{ secrets.SSHKEY }}
      with:
        source: documentation/*
        target: ${{ secrets.TARGETDIR }}
        rm: true
  • List current dir after download outputs:
documentation
src
package.json
... other files
  • List documentation content after download outputs:
index.html
favicon.icon
... other files

My target dir is /var/www/{somePath}/demo/{themeName}/documentation and I want to paste all content of documentation dir to the /var/www/{somePath}/demo/{themeName}/documentation but using source: documentation/* isn't working.

Also, I am using rm: true because I want to remove the existing target dir /var/www/{somePath}/demo/{themeName}/documentation before uploading.

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions