appleboy / appleboy/scp-action
tar: empty archive exit status 1
- Dominant language
- Shell
- Stars
- 1.6k
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
Hello! I need help about this error
```
tar all files into /tmp/3708965802/TApWAslSeb.tar
tar -cf /tmp/3708965802/TApWAslSeb.tar
tar: empty archive
exit status 1
```
when trying to upload react app build directory to my server with this workflow:
```
jobs:
build:
runs-on: ubuntu-latest
env:
CI: false
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 21.0.0
- name: Install yarn
run: npm install -g yarn
- name: Install Dependencies
run: yarn install --immutable --immutable-cache --check-cache
- name: Build React App
run: yarn run build
- name: Check current directory
run: |
ls -a build/
echo "Current Directory: $(pwd)"
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy React App
uses: appleboy/scp-action@v0.1.3
with:
host: ${{ secrets.SERVER_HOST }}
username: ${{ secrets.SERVER_USERNAME }}
password: ${{ secrets.SERVER_PASSWORD }}
source: app/build/
target: /home/${{ secrets.SERVER_USERNAME }}/project/nodam-nodam/
rm: true
debug: true
```
Also I verified that source directory(app/build/) exists by step Check current directory:
```shell
Run ls -a build/
ls -a build/
echo "Current Directory: $(pwd)"
shell: /usr/bin/bash -e {0}
env:
CI: false
.
..
asset-manifest.json
assets
favicon.ico
index.html
logo19[2](https://github.com/ThisIsComedy/nodam-nodam_frontend/actions/runs/6905446166/job/18806315947#step:7:2).png
logo[5](https://github.com/ThisIsComedy/nodam-nodam_frontend/actions/runs/6905446166/job/18806315947#step:7:5)[12](https://github.com/ThisIsComedy/nodam-nodam_frontend/actions/runs/6905446166/job/18806315947#step:7:13).png
manifest.json
robots.txt
static
Current Directory: /home/runner/work/nodam-nodam_frontend/nodam-nodam_frontend
```
I have already searched for similar problems and solutions, but I can't solved it.
How can I solve this problem?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the deploy job in the reported workflow and the scp-action v0.1.3 source, focusing on how its source input is resolved. Compare the deploy workspace with the build output shown by the Check current directory step. Done means the action can locate the intended build directory and completes the upload without the empty-archive error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, react, shell
- Domain
- ci-cd, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100