Deploying from self-hosted
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 32/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- github-actions, typescript
调研方向
从工作流中使用的 caprover/deploy-from-github action 以及报告的 ENOENT 路径 /github/workspace/deploy.tar 开始;比较工作目录和归档路径在 self-hosted runner 与 GitHub-hosted runner 上的解析方式。复现提供的工作流,然后验证在 self-hosted runner 上使用生成的 deploy.tar 可以成功部署。
由索引模型根据 Issue 内容生成。
描述
I think there might be an issue with using self-hosted runners to deploy caprover tar files.
Here is what I have:
name: Build & deploy
on:
workflow_dispatch:
push:
jobs:
build-and-deploy:
name: Build & Deploy
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8.5.0
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm turbo run build --filter web
- uses: a7ul/[email protected]
with:
command: c
cwd: './apps/web'
files: |
build/
captain-definition
nginx.conf
Dockerfile
outPath: deploy.tar
- name: Deploy App to CapRover
uses: caprover/[email protected]
with:
server: '${{ secrets.CAPROVER_SERVER }}'
app: '${{ secrets.APP_NAME }}'
token: '${{ secrets.APP_TOKEN }}'
This workflow fails with the following message:
Preparing deployment to CapRover...
Ensuring authentication...
Deploying *** to https://captain.site.cyka.info.../
Something bad happened: cannot deploy *** at https://captain.site.cyka.info./
ENOENT: no such file or directory, stat '/github/workspace/deploy.tar'
Meanwhile, if you try to run the same thing on a github provided runner like ubuntu-20.04, it deploys without any problems.
I think this might be a misconfiguration on my end, where caprover is looking for the deploy.tar file inside of
/github/workspace instead of github/workspace/project_name/project_name
- 主要语言
- TypeScript
- 星标
- 66
- 派生
- 20
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
相似的 Issue
-
check:passed streams:remove
难度 1/5 1 小时以内 新手友好度 67/100
维护者通常 1 天内回复
-
bug priority-p1
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
-
beginner blocked
难度 2/5 1-3 小时 新手友好度 82/100
hiero-ledger/hiero-sdk-js#4670 ·
维护者通常 1 天内回复
-
[Exploratory] Expense - 2 selected drop-down is shown twice when selecting hold from more option.未关闭Monthly Not a priority
难度 2/5 1-3 小时 新手友好度 65/100
Expensify/App#106080 · 1 条评论 ·
维护者通常 1 天内回复