Skip to content

Commit

Permalink
Add build and deploy workflows; update web.config defaults.
Browse files Browse the repository at this point in the history
  • Loading branch information
tymorrow committed Jun 16, 2024
1 parent 3a4171c commit 530fc30
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Sphinx Build
on: [push]
on:
push:
branches:
- master
jobs:
build:
runs-on: windows-2019
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Sphinx Deploy
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: windows-latest
env:
SPHINX_PACKAGE: ${{ github.workspace }}\src\Dsp.Web\obj\Release\Package\Dsp.Web.zip
SPHINX_USERNAME: ${{ secrets.MSDEPLOY_USERNAME }}
SPHINX_PASSWORD: ${{ secrets.MSDEPLOY_PASSWORD }}
SPHINX_DEPLOY_URL: ${{ secrets.MSDEPLOY_URL }}
steps:
- uses: actions/checkout@v2
- name: Setup MSBuild v1
uses: microsoft/setup-msbuild@v1
- name: Setup NuGet v2.0.0
uses: NuGet/[email protected]
- name: Setup MSBuild v1.1
uses: microsoft/[email protected]
- name: Restore Packages
run: nuget restore src/Sphinx.sln
- name: Build Solution
run: >
msbuild .\src\Sphinx.sln `
/p:Configuration=Release `
/p:GenerateSerializationAssemblies=False `
/p:DeployOnBuild=true `
/p:WebPublishMethod=Package `
/p:PackageAsSingleFile=true `
/p:IncludeSetAclProviderOnDestination=False `
/p:AutoParameterizationWebConfigConnectionStrings=False
- name: Deploy Application
shell: cmd
run: '"C:/Program Files (x86)/IIS/Microsoft Web Deploy V3/msdeploy.exe" -verb:sync -allowUntrusted -source:package=${{ env.SPHINX_PACKAGE }} -dest:auto,ComputerName=${{ env.SPHINX_DEPLOY_URL }},UserName=${{ env.SPHINX_USERNAME }},Password=${{ env.SPHINX_PASSWORD }},IncludeAcls=False,AuthType=Basic -setParam:name="IIS Web Application Name",value=Sphinx -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension'
3
2 changes: 1 addition & 1 deletion src/Dsp.Web/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</sectionGroup>
</configSections>
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\dspdb.mdf;Initial Catalog=dspdb;Integrated Security=True" providerName="System.Data.SqlClient" />
<add name="DefaultConnection" connectionString="Data Source=(local);Initial Catalog=dspdb;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
Expand Down

0 comments on commit 530fc30

Please sign in to comment.