GitHub Actions 工作流程错误:运行命令超时!即使剧本做得很好

2024-04-17

每次提交到存储库时,我想在远程服务器上部署 Nuxt.js 应用程序。 这是我的deploy.yml:

name: 'Deployment'

on:
  push:
    branches: ['master']

jobs:
  deploy:
    name: Deploy
    runs-on: ubuntu-latest
    steps:
    - name: Connect to SSH
      uses: appleboy/ssh-action@master
      with:
        host: webhostgb.com
        username: root
        key: ${{ secrets.PRIVATE_KEY }}
        port: 22
        script: |
          cd whgb-new
          git pull origin master
          npm run build
          fuser -kn tcp 3000
          pm2 restart deploy.sh

基本上deploy.sh运行npm start,但我使用pm2创建另一个进程而不是在GitHub actions进程中进行部署

10 分钟后我得到了这个错误,即使它做得很好:

err: 4bc06ed9a5a0b2fa431a.js   4.77 KiB      14  [emitted] [immutable]  pages/products/tags/_slug
err: 7bf498872cde31ceb6dd.js   13.3 KiB       7  [emitted] [immutable]  pages/docs/_slug/index
err: 8992f5bd049ebae3c980.js   15.6 KiB       8  [emitted] [immutable]  pages/docs/categories/_slug
err: 8e455a3b7f57d2d0fa08.js   4.53 KiB      13  [emitted] [immutable]  pages/products/index
err: b3a251f0bfe837f702a7.js   1.17 KiB       3  [emitted] [immutable]  pages/articles/_slug/index
err: b68201808fd6f4aec517.js   10.1 KiB       4  [emitted] [immutable]  pages/articles/categories/_slug
err: d7cc3a28494e6a6dcc7a.js   15.3 KiB       9  [emitted] [immutable]  pages/docs/index
err: e0d85ab9fd3f1ed51e0d.js   1.35 KiB       1  [emitted] [immutable]  pages/_
err:               server.js    205 KiB       0  [emitted]              app
err:    server.manifest.json  957 bytes          [emitted]              
err: Entrypoint app = server.js
err: 3000/tcp:           
out:  31207
out: > [email protected] /cdn-cgi/l/email-protection start /root/whgb-new
out: > nuxt start
out: 
out: ℹ Listening on: http://localhost:3000/
2020/05/31 01:39:05 Error: command timeout
err: Run Command Timeout!

我犯了同样的错误。我用变量修复它command_timeout.

例如 :

...
port: 22
command_timeout: 200m
...

也许它能有所帮助。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

GitHub Actions 工作流程错误:运行命令超时!即使剧本做得很好 的相关文章

  • 如何替换带引号的多单词字符串作为参数?

    我正在尝试替换包含多个带引号的单词的字符串变量作为命令的参数 因此 给出以下示例脚本 请注意 shebang 中的 x 这会导致输出被记录到 stderr bin bash x myArg hello world echo string i
  • Openshift 上的自定义 Node.js 版本

    我在运行自定义节点版本时遇到问题node0 10您可以在开放班次中找到墨盒here https github com DavidReinberger openshift meteor leaderboard customNode 我可以很好
  • 如何使用 cron 作业运行 python 文件

    您好 我创建了一个 python 文件 例如file example py 该文件将输出 sensex 值 假设该文件在linux系统上的路径为 Desktop downloads file example py 我通常会运行该文件pyth
  • 如何“grep”连续流?

    可以用吗grep在连续的流中 我的意思是有点tail f
  • Bash 完成脚本在某些参数选项后完成文件路径

    我正在为命令行工具编写 bash 完成脚本 plink local cur prev opts COMPREPLY cur COMP WORDS COMP CWORD prev COMP WORDS COMP CWORD 1 opts 1
  • bash双括号问题

    我对 bash 脚本非常陌生 在使用双括号时遇到了问题 我似乎无法让它们在 Ubuntu Server 11 10 中工作 我的下面的脚本位于 if test sh 中 bin bash if 14 14 then echo FOO fi
  • 如何从 C 函数创建 shell 命令

    想知道如何获取一组 C 函数并将它们转换为 shell bash 命令 假设我有一组简单的 C 函数 int fn1 some C code for function 1 int fn2 some C code for function 2
  • 如何共享/扩展/重用/引用 GitHub Workflow?

    我有两个工作流程 一种方式是通过推送到 master 来部署到测试环境 另一个在发布到生产环境时部署 它们90 相同 代码复制粘贴 是否有一个概念 例如提取部分重复逻辑并将其放入自己的文件 部分 片段中 GitHub Actions 中的重
  • 使用 sed 将 old-link-url 替换为 new-link-url

    我正在 bash 中编写一个脚本 将 old link url 替换为 new link url 我的问题是 sed 由于斜杠而无法替换 url 如果我只输入一些文字就可以了 my code sed e s old link new lin
  • 子 shell 何时继承其父 shell 环境?

    什么情况下将shell的环境传递给子shell 子 shell 始终从父 shell 获取所有变量 man bash将描述所有使用子shell的情况 主要是 command command command and command 所谓环境只
  • 通过 SSH 将变量传递给远程脚本

    我正在通过 SSH 从本地服务器在远程服务器上运行脚本 首先使用 SCP 复制该脚本 然后在传递一些参数时调用该脚本 如下所示 scp path to script server example org another path ssh s
  • Windows、Emacs、Git Bash 和 shell 命令

    Windows 7 Emacs 24 3 1 git 1 8 1 msysgit 1 我的等效 emacs 文件中有以下内容 if equal system type windows nt progn setq explicit shell
  • 向伪 shell (pty) 发出命令

    我尝试使用 subprocess popen os spawn 来运行进程 但似乎需要伪终端 import pty master slave pty openpty os write master ls l 应该发送 ls l 到从属终端
  • 是否有可能在linux中找到包含特定文本的文件?

    考虑这种情况 我在文件夹 Example 下有很多文件 如果我需要找到一个包含特定短语 如 Class Example 的文件 我该如何使用 Linux shell 来做到这一点 linux中有类似 定位 的函数可以做到这一点吗 Thank
  • Bash 脚本 - 迭代 find 的输出

    我有一个 bash 脚本 其中需要迭代 find 命令输出的每一行 但似乎我正在迭代 find 命令中的每个单词 以空格分隔 到目前为止我的脚本看起来像这样 folders find maxdepth 1 type d for i in f
  • 访问 .js 文件中的 Nuxt 插件

    假设我有一个脚本文件 foo js function doStuff how to access store and other plugins here export default doStuff 如果不将调用组件作为参数传递 我如何访
  • SSHKit::Runner::ExecuteError:以 root@co 身份执行时出现异常:Jenkins Job 的 shell 脚本中的用户 root@ 身份验证失败

    我正在尝试从 Jenkins Job 运行 cap 部署命令 它不断抛出以下错误 我也在部署服务器中添加了 ssh 密钥 我能够从配置 Jenkins 的服务器成功部署 但是当我运行该作业时 会引发身份验证错误 这对我来说真的很重要 有人可
  • ExpressJS - 提供通用 Nuxt 应用程序和 AngularJS SPA

    我有一个具有以下结构的博客项目 服务器 用 Node Express 编写 管理员 AngularJS SPA public AngularJS SPA 目前 管理部分和公共部分具有相同的域 但管理部分使用不同的子域 这允许我在 Expre
  • 如何让“grep”从文件中读取模式?

    假设有一个很大的文本文件 我只想打印与某些模式不匹配的行 显然 我可以使用egrep v patter1 pattern2 pattern3 现在 如果所有这些模式都在一个文本文件中怎么办 最好的制作方法是什么egrep从文件中读取模式 g
  • bash 变量中的 Linux 鞭尾/对话框参数错误

    有人可以解释为什么下面的代码不起作用吗 我要疯狂地想找出答案 bin bash TEST M1 1 wire Interface ON echo TEST RESULT dialog title Config Modules State c

随机推荐