英文:
How to auto-run maven project with Azure after CD and display correct webpage
问题
我正在尝试托管一个网页,但我不确定如何做,搜索也没有显示与我特定尝试的相关内容。
我在GitHub上有一个Java Maven项目,并且已经设置了CD到Azure,所以每当我推送到GitHub时,Azure会下载该项目。
当你运行Maven程序时,会在存储库中创建一个名为“webpage.html”的HTML文件。我希望在进入我的Azure网页时能够显示这个HTML文件。
所以,每当我推送到GitHub,Azure克隆项目后,我希望它运行Maven程序(以创建HTML文件),然后在你进入网站时显示HTML文件。我应该如何做到这一点?
我已经验证了Azure确实克隆了Git存储库,但我不知道如何让它运行Java代码并显示HTML文件。
英文:
I’m trying to host a webpage but I’m unsure as to how and googling doesn’t show anything relevant to what I’m trying to do specifically.
I have a Java maven project on GitHub, and I’ve set up CD to Azure so whenever I push to GitHub, Azure downloads the project.
When you run the maven program a “webpage.html” is created in the repository. I want this html file to be displayed when I enter my Azure webpage.
So, whenever I push to GitHub and Azure clones the project, I want it to run the maven program (to create the html file) and then display the html file when you enter the website. How do I do this?
I have verified that azure does indeed clone the git repository, but I don't see how I make it run the java code and display the html file.
答案1
得分: 1
确保“webpage.html”在“设置 - 配置 - 默认文档”列表中。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论