Skip to content

Commit 53eebc3

Browse files
committed
2 parents a26b043 + 5374c97 commit 53eebc3

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy
2+
# More GitHub Actions for Azure: https://github.com/Azure/actions
3+
4+
name: Build and deploy ASP.Net Core app to Azure Web App - surveyjs-nce
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
runs-on: windows-latest
15+
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- name: Set up .NET Core
20+
uses: actions/setup-dotnet@v1
21+
with:
22+
dotnet-version: '7.x'
23+
include-prerelease: true
24+
25+
- name: Build with dotnet
26+
run: dotnet build --configuration Release
27+
28+
- name: dotnet publish
29+
run: dotnet publish -c Release -o ${{env.DOTNET_ROOT}}/myapp
30+
31+
- name: Upload artifact for deployment job
32+
uses: actions/upload-artifact@v2
33+
with:
34+
name: .net-app
35+
path: ${{env.DOTNET_ROOT}}/myapp
36+
37+
deploy:
38+
runs-on: windows-latest
39+
needs: build
40+
environment:
41+
name: 'Production'
42+
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
43+
44+
steps:
45+
- name: Download artifact from build job
46+
uses: actions/download-artifact@v2
47+
with:
48+
name: .net-app
49+
50+
- name: Deploy to Azure Web App
51+
id: deploy-to-webapp
52+
uses: azure/webapps-deploy@v2
53+
with:
54+
app-name: 'surveyjs-nce'
55+
slot-name: 'Production'
56+
publish-profile: ${{ secrets.AZUREAPPSERVICE_PUBLISHPROFILE_2E5BAFF232674301A9AB354674C65C3B }}
57+
package: .

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This example demonstrates how to generate forms in JSON format based on strongly-typed domain models and vice versa. Generated forms can be displayed by SurveyJS Form Library and edited in Survey Creator. This solution will be beneficial for content and product managers who regularly create forms and for backend developers who implement domain models based on these forms.
44

5-
<!-- TODO: Add illustration -->
5+
![Generate Forms for Domain Models and Edit the Forms in a No-code Visual Editor](https://user-images.githubusercontent.com/18551316/227605125-24ca0d80-da93-4ec9-9bfd-0cd082808a93.png)
66

77
This application was built using ASP.NET Core. Follow the same instructions if you need to implement this functionality with any other server-side framework.
88

@@ -43,7 +43,7 @@ SurveyJS ships with a tool that displays surveys and forms&mdash;[SurveyJS Form
4343

4444
In this project, SurveyJS Form Library displays JSON schemas that come from different sources. The "NPS Survey" and "Patient Assessment" forms are pre-generated and stored as JSON files in the [Data](/Data/) directory. The "Job Application" form is generated from the `JobApplication` domain model on the fly. If a form JSON schema has been edited, its most recent version is stored in a database (or [database emulator](/DomainModels/DataStorage.cs), as in this application). When Form Library requests a JSON schema of a certain type, the server first searches for the most recently edited schema of that type in the database. If the schema is not found, the server returns a pre-generated schema from one of the JSON files. If a file with a schema of that type is also absent, the server generates the schema on the fly. Refer to the following file to find methods that implement this logic: [JsonForms.cs](/DomainModelsViews/JsonForms.cs).
4545

46-
<!-- TODO: Add illustration -->
46+
![The order of getting a JSON schema for display](https://user-images.githubusercontent.com/18551316/227605277-f740d804-f653-4b1b-ac7b-5fb2f92906fa.png)
4747

4848
## Edit JSON Schemas
4949

0 commit comments

Comments
 (0)