github动作失败了吗? tar空档案,docker运行失败,退出代码为1

时间:2019-12-30 16:28:27

标签: github yaml github-actions

这是项目结构:

--lineinfo

这是工作流程中的.yml文件:

- parent/
|- .github/workflows/
|- frontend/
|- ...

只要动作执行到步骤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

第一次使用github动作,所以我对这个错误很迷失。感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

继续弄弄它,终于弄明白了:

- 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:
        source: frontend/build/
        target: "/home/build/site/testDir/"
        strip_components: 1