-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11ce7ef
commit fefb223
Showing
12 changed files
with
155 additions
and
32 deletions.
There are no files selected for viewing
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
103 changes: 103 additions & 0 deletions
103
templates/Coalesce.Vue.Template/content/.github/workflows/build-test-and-deploy.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
name: Build, Test, and Deploy Coalesce.Starter.Vue | ||
|
||
# https://docs.github.com/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
# CONFIGURATION | ||
# For help, go to https://github.com/Azure/Actions | ||
# | ||
# 1. Set up the production Environment in the GitHub Repository Settings. | ||
# Environment Protection Rules are recommended to prevent accidental deployments. | ||
# https://docs.github.com/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment#deployment-protection-rules | ||
# | ||
# 2. Set up the following secrets in your repository - https://docs.github.com/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-an-environment | ||
# AZURE_WEBAPP_PUBLISH_PROFILE | ||
# | ||
# 3. Change these variables for your configuration: | ||
env: | ||
AZURE_WEBAPP_NAME: MY_WEBAPP_NAME # set this to your app service name | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
|
||
- name: Use .NET SDK | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: 8.x | ||
include-preview: true | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22.x | ||
|
||
- name: npm ci | ||
run: npm ci | ||
working-directory: Coalesce.Starter.Vue.Web | ||
|
||
- name: Restore Nuget packages | ||
run: dotnet restore | ||
|
||
- name: Check Coalesce has been run | ||
run: dotnet coalesce --what-if --verify | ||
working-directory: Coalesce.Starter.Vue.Web | ||
|
||
- name: npm run lint | ||
run: npm run lint | ||
working-directory: Coalesce.Starter.Vue.Web | ||
|
||
- name: npm run build | ||
run: npm run build | ||
working-directory: Coalesce.Starter.Vue.Web | ||
|
||
- name: dotnet build | ||
run: dotnet build --configuration Release --no-restore --no-incremental | ||
|
||
- name: dotnet test | ||
run: dotnet test --configuration Release --no-restore --no-build | ||
|
||
- name: dotnet publish | ||
run: dotnet publish ${{ github.workspace }}/Coalesce.Starter.Vue.Web/Coalesce.Starter.Vue.Web.csproj --configuration Release --output ${{ github.workspace }}/publish --no-restore --no-build | ||
|
||
- name: Upload artifact for deployment | ||
if: github.event_name != 'pull_request' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: .coalesce-app | ||
path: ${{ github.workspace }}/publish | ||
if-no-files-found: error | ||
|
||
# Deploys the app to Azure App Service | ||
# https://docs.github.com/actions/use-cases-and-examples/deploying/deploying-net-to-azure-app-service | ||
deploy-production: | ||
needs: build-and-test | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'pull_request' | ||
environment: | ||
name: 'production' | ||
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }} | ||
|
||
steps: | ||
- name: Download artifact for deployment | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: .coalesce-app | ||
|
||
- name: Deploy to Azure Web App | ||
uses: azure/webapps-deploy@v3 | ||
with: | ||
app-name: ${{ env.AZURE_WEBAPP_NAME }} | ||
slot-name: 'production' | ||
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | ||
package: . |
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
10 changes: 1 addition & 9 deletions
10
.../Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/Api/Generated/UserController.g.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
.../Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/Models/Generated/UserInfoDto.g.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
18 changes: 9 additions & 9 deletions
18
templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
6 changes: 6 additions & 0 deletions
6
templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/metadata.g.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
templates/Coalesce.Vue.Template/content/Coalesce.Starter.Vue.Web/src/models.g.ts
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.