Merge pull request #14 from AcademiaY4/develop #18
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
name: Build and Deploy to Azure | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: "8.0.x" | |
- name: Restore | |
run: dotnet restore ./backend.sln | |
- name: Build | |
run: dotnet build ./backend.sln --configuration Release --no-restore | |
- name: Publish | |
run: dotnet publish ./backend.sln --configuration Release --no-build --output './publish' | |
- name: Deploy to Azure | |
uses: azure/webapps-deploy@v2 | |
with: | |
app-name: apekadeserver | |
publish-profile: ${{ secrets.AWPP }} | |
package: './publish' | |
- name: Deploy Summary | |
run: | | |
echo '### π Build and Deploy Summary' > $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo 'π§ **Build Status**: The app has been successfully built.' >> $GITHUB_STEP_SUMMARY | |
echo 'π **Deploy Status**: The app has been successfully deployed to Azure.' >> $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo 'π οΈ **Solution**: backend.sln' >> $GITHUB_STEP_SUMMARY | |
echo 'π¦ **Build Configuration**: Release' >> $GITHUB_STEP_SUMMARY | |
echo 'π **Output Directory**: ./publish' >> $GITHUB_STEP_SUMMARY | |
echo 'π **Azure App Name**: apekade-server' >> $GITHUB_STEP_SUMMARY | |
echo '' >> $GITHUB_STEP_SUMMARY | |
echo 'π **Thanks for using GitHub Actions!**' >> $GITHUB_STEP_SUMMARY |