Skip to content

Commit

Permalink
Merge branch 'main' into tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-dutton authored Oct 26, 2023
2 parents 0813c47 + f39df97 commit 9c45d40
Show file tree
Hide file tree
Showing 13 changed files with 341 additions and 28 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/main_blazor-appl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Blazor-appl - Build and deploy

on:
push:
branches:
- main
paths:
- "src/apps/blazor-app/**"
- ".github/workflows/main_blazor-appl.yml"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: src/apps/blazor-app

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
include-prerelease: true

- name: Build with dotnet
run: |
yarn
dotnet build -c Release
- name: dotnet publish
run: dotnet publish -c Release -o ./publish

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: src/apps/blazor-app/publish

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: "blazor-appl"
slot-name: "Production"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_7CF290DC47994C3BA43A303FCF5A89CA }}
package: .
64 changes: 64 additions & 0 deletions .github/workflows/main_dot-net-api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy - dot-net-api

on:
push:
branches:
- "main"
paths:
- "src/apps/api/**"
- ".github/workflows/main_dot-net-api.yml"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: src/apps/api

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
include-prerelease: true

- name: Build with dotnet
run: dotnet build -c Release

- name: dotnet publish
run: dotnet publish -c Release -o ./publish

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: src/apps/api/publish

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: "dot-net-api"
slot-name: "Production"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_D7DCB7DDE31F4AA9879DA722FF5637EE }}
package: .
78 changes: 78 additions & 0 deletions .github/workflows/main_express-microservice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Express - Build and Deploy

on:
push:
branches:
- main
paths:
- "src/apps/services/**"
- ".github/workflows/main_express-microservice.yml"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: src

steps:
- uses: actions/checkout@v2

- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: "18.x"

- name: yarn install and build
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: |
src/yarn.lock
src/package-lock.json
- run: |
yarn
yarn nx run services:build --configuration=production
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: node-app
path: |
src/dist/apps/services
src/package.json
src/.puppeteerrc.cjs
deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: node-app

- run: mv dist/apps/services/* .

- run: yarn add puppeteer

- run: yarn --production

- name: "Deploy to Azure Web App"
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: "express-microservice"
slot-name: "Production"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_B5AD89411527464CA08BE8E4F87274B2 }}
package: .
64 changes: 64 additions & 0 deletions .github/workflows/main_libs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
# More GitHub Actions for Azure: https://github.com/Azure/actions

name: Build and deploy - libs

on:
push:
branches:
- "main"
paths:
- "src/libs/**"
- ".github/workflows/main_libs.yml"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
working-directory: src/libs/shared-utils

steps:
- uses: actions/checkout@v2

- name: Set up .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
include-prerelease: true

- name: Build with dotnet
run: dotnet build -c Release

- name: dotnet publish
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v2
with:
name: .net-app
path: ${{env.DOTNET_ROOT}}/myapp

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: "Production"
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v2
with:
name: .net-app

- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: "libs"
slot-name: "Production"
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_927C1878D22148E4A15E97F5A738E248 }}
package: .
3 changes: 2 additions & 1 deletion src/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@ Thumbs.db
.env
.env.*

apps/machine-learning/*
apps/machine-learning/*
/.cache
9 changes: 9 additions & 0 deletions src/.puppeteerrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const {join} = require('path');

/**
* @type {import("puppeteer").Configuration}
*/
module.exports = {
// Changes the cache location for Puppeteer.
cacheDirectory: join(__dirname, '.cache', 'puppeteer'),
};
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<h1 class="text-md">@Title</h1>
</Superscript>
</Heading>
<p class="font-medium text-sm w-[90%]">@Text</p>
<p class="font-medium text-sm w-[90%]" id="locationNameP">@Text</p>
</div>
</div>

Expand Down
Loading

0 comments on commit 9c45d40

Please sign in to comment.