I have a react app in github in the repo call acme\myreactapp. There are 2 other repos, acme\uihelper and acme\clienthelper that are needed to run the app.
So on my local machine i would have a directory lets say gitreact and in there would be 3 directories webapp, ui and help-renderer. I then open the client app under myreactapp and use open in terminal and do npm run and its fine.
But in Azure under deployment centre it only allows me to clone only one repo, myreactapp.
How can i set it so it clones the other 2 and deploys ? Do i have to modify the yaml file ? if so how can i do that to get the other 2 repos
I have a react app in github in the repo call acme\myreactapp. There are 2 other repos, acme\uihelper and acme\clienthelper that are needed to run the app.
So on my local machine i would have a directory lets say gitreact and in there would be 3 directories webapp, ui and help-renderer. I then open the client app under myreactapp and use open in terminal and do npm run and its fine.
But in Azure under deployment centre it only allows me to clone only one repo, myreactapp.
How can i set it so it clones the other 2 and deploys ? Do i have to modify the yaml file ? if so how can i do that to get the other 2 repos
Share Improve this question edited Feb 18 at 21:23 Wendy asked Feb 17 at 3:48 Wendy Wendy 177 bronze badges 1- Can you publish them? – Daniel A. White Commented Feb 17 at 3:51
1 Answer
Reset to default -1I assume you are using github actions to deploy the applications.
You can modify github workflow file to use actions/checkout@v4
multiple times to clone each repository into the same workspace
I will give some example workflow file
name: Deploy React App to Azure
on:
push:
branches:
- main # Adjust based on your default branch
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout myreactapp repo
uses: actions/checkout@v4
with:
repository: acme/myreactapp
path: myreactapp
- name: Checkout uihelper repo
uses: actions/checkout@v4
with:
repository: acme/uihelper
path: uihelper
- name: Checkout clienthelper repo
uses: actions/checkout@v4
with:
repository: acme/clienthelper
path: clienthelper
- name: Install dependencies
run: |
cd myreactapp
npm install
- name: Build app
run: |
cd myreactapp
npm run build
- name: Deploy to Azure
uses: azure/webapps-deploy@v2
with:
app-name: "myreactapp"
package: "myreactapp/build"
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}