GitHub Codespaces 有些慢且收费,于是自己做了一个(浏览器内的 VSCode,带云端开发环境)

2021-03-14 18:45:56 +08:00
 pseudo

继实现对 GitHub 仓库进行在线 VSCode 编辑的功能后,还是不太满足。试用了一下 Codespaces 和 GitPod,发现对国内访问都不太友好(启动开发环境 /打开文件 /命令行都比较慢)。于是顺便实现了在线开发环境,亮点如下:

仓库地址

主仓库

网站地址

将链接中的 github 替换为 github-vsc 即可。

例如 github.com/facebook/create-react-app -> github-vsc.com/facebook/create-react-app

启动开发环境

  1. 激活 VSCode 左侧第六个 tab ( GitHub logo )
  2. 设置含有 repo access 的 GitHub PAT
  3. 选择就近的 runner server 和喜爱的操作系统,然后点按 "Start Session"

端口映射

create-react-app 为例,在命令行中执行 yarn start 后开启到端口 3000 的映射,就能从浏览器中访问了。

2646 次点击
所在节点    程序员
7 条回复
adjusted
2021-03-14 18:58:35 +08:00
请问这个是基于 GitPod 搭建的么?
pseudo
2021-03-14 20:30:17 +08:00
@adjusted #1 是基于 GitHub Actions
iBugOne
2021-03-14 21:03:59 +08:00
直觉告诉我 GitHub Actions 并不是这样用的。

参见 GitHub 的条款说明 <https://docs.github.com/en/github/site-policy/github-additional-product-terms#a-actions-usage>,章节 a 的第 5 个点

> any other activity unrelated to the production, testing, deployment, or publication of the software project associated with the repository where GitHub Actions are used.

这个用法称作 development 应该更合适,所以就不属于 production, testing, deployment, or publication of the software project 了,按我的理解就违反了上面引用的这一条。
whileFalse
2021-03-15 08:50:48 +08:00
呃,虽然看起来很屌,但弄个好点的机场不就完了么……何必这么折腾。
enki0423
2021-03-15 09:31:01 +08:00
Codespaces 收费了?
pseudo
2021-03-15 10:20:44 +08:00
@iBugOne #3 嗯,你说的对。当时只注意到 but a low benefit Action could be ok if it’s also low burden,没仔细看下面一条。疏忽了,我处理下。
whileFalse
2021-03-15 11:11:47 +08:00
刚刚确认了一下,GCP 提供带 Web-IDE 的 Cloud Shell 。永久免费,每周限量 50 个小时。
https://ide.cloud.google.com/

这应该可以秒杀任何其他免费 Web-IDE 了吧。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/761551

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX