Skip to content

Commit

Permalink
Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
support committed Mar 3, 2024
1 parent f785d2a commit b94a19a
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 51 deletions.
51 changes: 0 additions & 51 deletions .github/workflows/feature-tmp-test1_grandnode.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/grandnode.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and deploy .NET Core app to Linux WebApp grandnode
on:
push:
branches: [ "feature/tmp-test1" ]

env:
AZURE_WEBAPP_NAME: grandnode-dev
AZURE_WEBAPP_PACKAGE_PATH: src/Web/Grand.Web/publish
AZURE_WEBAPP_PUBLISH_PROFILE: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
CONFIGURATION: Release
DOTNET_CORE_VERSION: 8.0.x
WORKING_DIRECTORY: src/Web/Grand.Web
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_CORE_VERSION }}
- name: Create mongoDB Docker container
run: sudo docker run -d -p 27017:27017 mongo:latest
- name: Restore
run: dotnet restore "${{ env.WORKING_DIRECTORY }}"
- name: Build sln
run: dotnet build "GrandNode.sln"
- name: Build
run: dotnet build "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-restore -p:SourceRevisionId=${{ github.sha }} -p:GitBranch=${{ github.ref_name }}
- name: Publish
run: dotnet publish "${{ env.WORKING_DIRECTORY }}" --configuration ${{ env.CONFIGURATION }} --no-build --output "${{ env.AZURE_WEBAPP_PACKAGE_PATH }}" -p:SourceRevisionId=${{ github.sha }} -p:GitBranch=${{ github.ref_name }}
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
publish-profile: ${{ env.AZURE_WEBAPP_PUBLISH_PROFILE }}
- name: Publish Artifacts
uses: actions/[email protected]
with:
name: webapp
path: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}

0 comments on commit b94a19a

Please sign in to comment.