Skip to content

Create test001

Create test001 #25

Workflow file for this run

name: Deploy to Azure
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: |
cd tabs && npm ci && cd ..
cd api && npm ci && cd ..
cd bot && npm ci && cd ..
- name: Build backend
run: |
cd api && npm run build
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x
- name: Build backend dotnet
run: |
cd api && dotnet build extensions.csproj -o bin --ignore-failed-sources
- name: Deploy backend to Azure Functions
uses: azure/functions-action@v1
with:
app-name: sharenowdev7db8feapi
slot-name: 'production'
publish-profile: ${{ secrets.AZURE_FUNCTIONS_PUBLISH_PROFILE }}
package: ./api
- name: Build bot
run: cd bot && npm run build
- name: Deploy bot to Azure App Service
uses: azure/webapps-deploy@v2
with:
app-name: sharenowdev7db8febot
publish-profile: ${{ secrets.AZURE_APP_SERVICE_PUBLISH_PROFILE }}
package: ./bot
- name: Build frontend
run: cd tabs && npm run build
env:
REACT_APP_CLIENT_ID: 17fa0bbd-c8e9-4982-b016-c983803d4db4
REACT_APP_START_LOGIN_PAGE_URL: https://sharenowdev7db8fetab.z13.web.core.windows.net/auth-start.html
REACT_APP_FUNC_ENDPOINT: https://sharenowdev7db8feapi.azurewebsites.net
REACT_APP_FUNC_NAME: posts
- name: Deploy frontend to Azure Storage
uses: azure/CLI@v1
with:
azcliversion: 2.0.72
inlineScript: |
az storage blob upload-batch --destination '$web' --source ./tabs/build --account-name sharenowdev7db8fetab --account-key ${{ secrets.AZURE_STORAGE_ACCOUNT_KEY }}