add $ #378
This file contains hidden or 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
| name: Build and Deploy to Azure | |
| env: | |
| AZURE_WEBAPP_NAME: devbetter-linux | |
| AZURE_GROUP_NAME: DevBetterGroup | |
| PUBLISH_DIR: '${{ github.workspace }}/publish' | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 9 SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore DevBetterWeb.slnx | |
| - name: Build and test | |
| run: dotnet test DevBetterWeb.slnx --filter FullyQualifiedName!~Vimeo.Tests --configuration Release | |
| - name: Publish app | |
| run: | | |
| dotnet publish ./src/DevBetterWeb.Web/DevBetterWeb.Web.csproj \ | |
| -c Release \ | |
| -r linux-x64 \ | |
| --self-contained true \ | |
| -o "$PUBLISH_DIR" \ | |
| /p:PublishTrimmed=false | |
| - name: Zip published output | |
| run: | | |
| cd "$PUBLISH_DIR" | |
| zip -r ../app.zip . | |
| - name: Deploy to Azure Web App using zipDeploy | |
| uses: azure/webapps-deploy@v3 | |
| with: | |
| app-name: ${{ env.AZURE_WEBAPP_NAME }} | |
| publish-profile: ${{ secrets.AZUREWEBAPPPUBLISHPROFILE }} | |
| package: ./app.zip | |
| deployment-method: zipDeploy |