html - Link to a file outside public repository on Github
问题描述
I recently created a webpage using Github pages. Since I don't have a paid account, the repository necessarily needs to be kept public. I'm okay with this, except for some .jpeg files which I would like to store in a different, private repository. When I did this and tried to provide a link to this file on the webpage, it didn't work.
Is there any way to do this?
解决方案
您可能会考虑一个GitHub Actions,例如Deploy to GitHub Pages,它引入了构建步骤工作流。
该步骤可以具有访问您的私有存储库并获取.jpeg
您需要将它们添加到构建的存储库的文件的必要秘密。
但这意味着这些文件将存储在公共存储库的发布分支中。
从公共存储库中,您将无法仅“添加链接”到私有存储库资源,而不以一种或另一种方式嵌入允许您访问所述私有存储库的秘密令牌。
推荐阅读
- awk - 使用 awk 从输出中排除记录的问题
- python - 如何使用自定义字段在 Django Admin 中实现日期范围过滤器?
- entity-framework-core - 使用 Hot Chocolate v11 在所有突变上添加中间件
- angular - 如何自动对焦 ngx-mat-intl-tel-input 搜索框而不是输入字段?
- react-native - 反应本机,在启动项目时解决已在使用的错误
- android-studio - Flutter - APK 大小翻了一番,没有重大的代码更改。压缩?
- reactjs - React-contenteditable:按 Enter 后如何将焦点更改为下一个文件
- ansible - 我想替换与特定模式/行相关的单词
- dbeaver - DBeaver 中的“删除连接”是什么?
- python - 通过过滤字符清理字符串列表