-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OrcaHello publish profiles (#184)
* Add github workflows for the OrcaHello UI and Api services * Add local .pubxml files (without any secrets in them) for OrcaHello Signed-off-by: Dave Thaler <dthaler1968@gmail.com>
- Loading branch information
Showing
4 changed files
with
199 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: OrcaHello.Web.Api | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ModeratorFrontEnd/OrcaHello/OrcaHello.Web.Api/** | ||
- ModeratorFrontEnd/OrcaHello/OrcaHello.Web.Shared/** | ||
workflow_dispatch: # Allow manual workflow invocation from the Github Actions UI | ||
|
||
env: | ||
DOTNET_VERSION: 6.0.x | ||
DOTNET_RUNTIME: win-x86 | ||
WORKING_DIR: ModeratorFrontEnd/OrcaHello/OrcaHello.Web.Api | ||
PUBLISH_DIR: output | ||
AZURE_APP_NAME: AIForOrcasDetections2 | ||
|
||
defaults: | ||
run: | ||
working-directory: ModeratorFrontEnd/OrcaHello/OrcaHello.Web.Api | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Dependencies | ||
run: dotnet restore -r ${{ env.DOTNET_RUNTIME }} | ||
- name: Build | ||
run: dotnet build --no-restore -c Release -r ${{ env.DOTNET_RUNTIME }} | ||
- name: Test | ||
run: dotnet test --no-restore -r ${{ env.DOTNET_RUNTIME }} | ||
- name: Publish | ||
run: dotnet publish --no-restore -c Release -o './${{ env.PUBLISH_DIR }}' | ||
- name: Artifacts cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./${{ env.WORKING_DIR }}/${{ env.PUBLISH_DIR }} | ||
key: ${{ github.sha }}-${{ env.AZURE_APP_NAME }}-${{ env.DOTNET_RUNTIME }}-artifacts | ||
deploy: | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
- name: Artifacts cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./${{ env.WORKING_DIR}}/${{ env.PUBLISH_DIR }} | ||
key: ${{ github.sha }}-${{ env.AZURE_APP_NAME }}-${{ env.DOTNET_RUNTIME }}-artifacts | ||
- name: Deploy to azure | ||
uses: azure/webapps-deploy@v2 | ||
with: | ||
app-name: ${{ env.AZURE_APP_NAME }} | ||
publish-profile: ${{ secrets.AZURE_ORCAHELLODETECTIONS_PUBLISH_PROFILE }} | ||
package: ./${{ env.WORKING_DIR }}/${{ env.PUBLISH_DIR }} |
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,72 @@ | ||
name: OrcaHello.Web.UI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- ModeratorFrontEnd/OrcaHello/OrcaHello.Web.UI/** | ||
- ModeratorFrontEnd/OrcaHello/OrcaHello.Web.Shared/** | ||
workflow_dispatch: # Allow manual workflow invocation from the Github Actions UI | ||
|
||
env: | ||
DOTNET_VERSION: 6.0.x | ||
DOTNET_RUNTIME: win-x86 | ||
WORKING_DIR: ModeratorFrontEnd/OrcaHello/OrcaHello.Web.UI | ||
PUBLISH_DIR: output | ||
AZURE_APP_NAME: AIForOrcas2 | ||
|
||
defaults: | ||
run: | ||
working-directory: ModeratorFrontEnd/OrcaHello/OrcaHello.Web.UI | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup .NET Core | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: ${{ env.DOTNET_VERSION }} | ||
- name: Dependencies | ||
run: dotnet restore -r ${{ env.DOTNET_RUNTIME }} | ||
- name: Build | ||
run: dotnet build --no-restore -c Release -r ${{ env.DOTNET_RUNTIME }} | ||
- name: Test | ||
run: dotnet test --no-restore -r ${{ env.DOTNET_RUNTIME }} | ||
- name: Publish | ||
run: dotnet publish --no-restore -c Release -o './${{ env.PUBLISH_DIR }}' | ||
- name: Artifacts cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./${{ env.WORKING_DIR }}/${{ env.PUBLISH_DIR }} | ||
key: ${{ github.sha }}-${{ env.AZURE_APP_NAME }}-${{ env.DOTNET_RUNTIME }}-artifacts | ||
deploy: | ||
if: github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
permissions: | ||
contents: read | ||
steps: | ||
- uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | ||
with: | ||
egress-policy: audit | ||
- name: Artifacts cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./${{ env.WORKING_DIR}}/${{ env.PUBLISH_DIR }} | ||
key: ${{ github.sha }}-${{ env.AZURE_APP_NAME }}-${{ env.DOTNET_RUNTIME }}-artifacts | ||
- name: Deploy to azure | ||
uses: azure/webapps-deploy@v2 | ||
with: | ||
app-name: ${{ env.AZURE_APP_NAME }} | ||
publish-profile: ${{ secrets.AZURE_ORCAHELLO_PUBLISH_PROFILE }} | ||
package: ./${{ env.WORKING_DIR }}/${{ env.PUBLISH_DIR }} |
27 changes: 27 additions & 0 deletions
27
...lo/OrcaHello.Web.Api/Properties/PublishProfiles/AIForOrcasDetections2 - Web Deploy.pubxml
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,27 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process | ||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<WebPublishMethod>MSDeploy</WebPublishMethod> | ||
<PublishProvider>AzureWebSite</PublishProvider> | ||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | ||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | ||
<SiteUrlToLaunchAfterPublish>https://aifororcasdetections2.azurewebsites.net</SiteUrlToLaunchAfterPublish> | ||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> | ||
<ExcludeApp_Data>false</ExcludeApp_Data> | ||
<ProjectGuid>7aa0448f-f0e4-43c8-a833-5038e38aac22</ProjectGuid> | ||
<MSDeployServiceURL>aifororcasdetections2.scm.azurewebsites.net:443</MSDeployServiceURL> | ||
<DeployIisAppPath>AIForOrcasDetections2</DeployIisAppPath> | ||
<RemoteSitePhysicalPath /> | ||
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer> | ||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod> | ||
<EnableMSDeployBackup>true</EnableMSDeployBackup> | ||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline> | ||
<UserName>$AIForOrcasDetections2</UserName> | ||
<_SavePWD>true</_SavePWD> | ||
<_DestinationType>AzureWebSite</_DestinationType> | ||
</PropertyGroup> | ||
</Project> |
28 changes: 28 additions & 0 deletions
28
...End/OrcaHello/OrcaHello.Web.UI/Properties/PublishProfiles/AIForOrcas2 - Web Deploy.pubxml
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,28 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process | ||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project> | ||
<PropertyGroup> | ||
<WebPublishMethod>MSDeploy</WebPublishMethod> | ||
<PublishProvider>AzureWebSite</PublishProvider> | ||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | ||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | ||
<SiteUrlToLaunchAfterPublish>https://aifororcas2.azurewebsites.net</SiteUrlToLaunchAfterPublish> | ||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish> | ||
<ExcludeApp_Data>false</ExcludeApp_Data> | ||
<ProjectGuid>77ab2826-1cf2-45dc-8322-10c94b982e2b</ProjectGuid> | ||
<MSDeployServiceURL>aifororcas2.scm.azurewebsites.net:443</MSDeployServiceURL> | ||
<DeployIisAppPath>AIForOrcas2</DeployIisAppPath> | ||
<RemoteSitePhysicalPath /> | ||
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer> | ||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod> | ||
<EnableMSDeployBackup>true</EnableMSDeployBackup> | ||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline> | ||
<UserName>$AIForOrcas2</UserName> | ||
<_SavePWD>true</_SavePWD> | ||
<_DestinationType>AzureWebSite</_DestinationType> | ||
<InstallAspNetCoreSiteExtension>false</InstallAspNetCoreSiteExtension> | ||
</PropertyGroup> | ||
</Project> |