【发布时间】:2020-04-19 09:10:51
【问题描述】:
这是项目结构:
- parent/
|- .github/workflows/
|- frontend/
|- ...
这是工作流中的 .yml 文件:
name: CI
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Install dependencies
working-directory: frontend
run: npm install
- name: Build
working-directory: frontend
run: npm run build
- name: Deploy Files
uses: appleboy/scp-action@master
env:
HOST: ${{ secrets.aws_pull_host }}
USERNAME: ${{ secrets.aws_pull_username }}
KEY: ${{ secrets.aws_pull_private_key }}
with:
working-directory: frontend
source: build/
target: "/home/build/site/testDir/"
strip_components: 1
每当操作到达步骤Deploy Files 时,我都会收到错误消息:
tar: empty archive
tar all files into /tmp/891353322/bC24rHhFAi.tar
exit status 1
##[error]Docker run failed with exit code 1
第一次使用 github 操作,所以我很迷失这个错误。感谢任何帮助。
【问题讨论】:
标签: github yaml github-actions