简体   繁体   English

在 github 页面上部署 React 应用程序时,如何将我的源代码上传到 github

[英]How can I upload my source code to github when deploying a React app on github pages

I recently successfully deployed a react app to github pages.我最近成功地将一个反应应用程序部署到 github 页面。 However, is there a way to show both the source code and the built code on github?但是,有没有办法在 github 上同时显示源代码和构建代码? When I check my repo, both the master branch and the gh-pages branch show the built code, as you can see here: https://github.com/daanishraj/tic-tac-toe-app/tree/master当我检查我的 repo 时,master 分支和 gh-pages 分支都显示了构建的代码,你可以在这里看到: https://github.com/daanishraj/tic-tac-toe-app/tree/master

However, I want a visitor to be able to see the.js files where I have defined my components etc.但是,我希望访问者能够看到我定义了组件等的 .js 文件。

How can this be achieved?如何做到这一点?

FYI: My app can be found here: https://daanishraj.github.io/tic-tac-toe-app/仅供参考:我的应用程序可以在这里找到: https://daanishraj.github.io/tic-tac-toe-app/

just create a gh-pages branch in your repository for deploying.只需在您的存储库中创建一个 gh-pages 分支进行部署。

look mine: source code: https://github.com/goldEli/miao-ui .看我的:源代码: https://github.com/goldEli/miao-ui github page: https://goldeli.github.io/miao-ui/ github页面: https://goldeli.github.io/miao-ui/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM