sách gpt4 ai đã đi

将文件从一个存储库复制到另一个存储库的 github 操作

In lại 作者:行者123 更新时间:2023-12-02 04:41:10 29 4
mua khóa gpt4 Nike

我的公司创建了一种在环境之间移动文件的复杂方法,现在我们希望将某些构建的 JS 文件(已转换和缩小)从一个 github 存储库移动到另一个。使用 github 操作可以实现这一点吗?

1 Câu trả lời

最简单的选择是克隆目标存储库,将文件复制到目标存储库中,使用 git 命令行暂存文件,然后提交它们。在脚本步骤中添加以下代码

run: |
git clone https://.:${{ secrets.GITHUB_TOKEN }}@github.com/project target
rm everything but the .git directory
copy source\files target
cd target
git thêm .
git diff-index --quiet HEAD || git commit -m "Automatic publish from github.com/project"
git push target master

关于将文件从一个存储库复制到另一个存储库的 github 操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59408320/

29 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com