Deploy App #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: workflow_dispatch | |
name: Deploy App | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 8 | |
- name: Build App Shell | |
shell: pwsh | |
working-directory: app-shell | |
run: | | |
npm install | |
npm run build | |
- name: Build Profile App | |
shell: pwsh | |
working-directory: profile | |
run: | | |
npm install | |
npm run build | |
- name: Build Catalog App | |
shell: pwsh | |
working-directory: catalog | |
run: dotnet publish src/CatalogApp -c Release -o dist | |
- name: Build Orders App | |
shell: pwsh | |
working-directory: orders | |
run: dotnet publish src/OrdersApp -c Release -o dist | |
- name: Deploy App Shell | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.APP_SHELL_DEPLOYMENT_TOKEN }} | |
action: upload | |
skip_app_build: true | |
skip_api_build: true | |
output_location: '' | |
app_location: app-shell/dist | |
- name: Deploy Profile App | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.PROFILE_APP_DEPLOYMENT_TOKEN }} | |
action: upload | |
skip_app_build: true | |
skip_api_build: true | |
output_location: '' | |
app_location: profile/dist | |
- name: Deploy Catalog App | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.CATALOG_APP_DEPLOYMENT_TOKEN }} | |
action: upload | |
skip_app_build: true | |
skip_api_build: true | |
output_location: '' | |
app_location: catalog/dist/wwwroot | |
- name: Deploy Orders App | |
uses: Azure/static-web-apps-deploy@v1 | |
with: | |
azure_static_web_apps_api_token: ${{ secrets.ORDERS_APP_DEPLOYMENT_TOKEN }} | |
action: upload | |
skip_app_build: true | |
skip_api_build: true | |
output_location: '' | |
app_location: orders/dist/wwwroot |