Initial ci
This commit is contained in:
34
.github/backend-ci.yml
vendored
Normal file
34
.github/backend-ci.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Backend CI/CD
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_deploy:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v1
|
||||||
|
with:
|
||||||
|
dotnet-version: '7.0.x'
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
dotnet restore
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
dotnet build --configuration Release
|
||||||
|
- name: Publish
|
||||||
|
run: |
|
||||||
|
cd backend
|
||||||
|
dotnet publish --configuration Release --output ./publish
|
||||||
|
- name: Deploy to Azure WebApp
|
||||||
|
uses: azure/webapps-deploy@v2
|
||||||
|
with:
|
||||||
|
app-name: "<YOUR_APP_SERVICE_NAME>"
|
||||||
|
slot-name: "production" # if using deployment slots
|
||||||
|
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
|
||||||
|
package: ./backend/publish
|
||||||
26
.github/frontend-ci.yml
vendored
Normal file
26
.github/frontend-ci.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
name: Frontend CI/CD
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_and_deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
npm install
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
cd frontend
|
||||||
|
npm run build
|
||||||
|
- name: Deploy to Azure Static Web Apps
|
||||||
|
uses: azure/static-web-apps-deploy@v1
|
||||||
|
with:
|
||||||
|
app_location: "frontend"
|
||||||
|
api_location: ""
|
||||||
|
output_location: "dist"
|
||||||
|
azure_static_web_apps_api_token: ${{ secrets.AZURE_SWA_TOKEN }}
|
||||||
Reference in New Issue
Block a user