-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into angular_upgrade
- Loading branch information
Showing
12 changed files
with
215 additions
and
6 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,41 @@ | ||
name: Build & Package API | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build_configuration: | ||
description: 'Build Configuration' | ||
type: string | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
jobs: | ||
# Build prod | ||
build-api-prod: | ||
name: Build API (prod) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.0.x' | ||
# include-prerelease: true | ||
|
||
- name: Build .NET project (prod) | ||
run: dotnet build ./WowsKarma.Api/WowsKarma.Api.csproj --configuration ${{ inputs.build_configuration }} | ||
|
||
- name: Package API (prod) | ||
run: dotnet publish ./WowsKarma.Api/WowsKarma.Api.csproj --configuration ${{ inputs.build_configuration }} --output ./publish | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wowskarma_api | ||
path: ./publish |
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,45 @@ | ||
name: Build & Package Web App | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build_configuration: | ||
description: 'Build Configuration' | ||
type: string | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
|
||
jobs: | ||
# Build angular app | ||
build-web: | ||
name: Build Web App | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
|
||
- name: Install Angular CLI | ||
run: npm install -g @angular/cli | ||
|
||
- name: Install dependencies | ||
working-directory: wowskarma.app | ||
run: npm install | ||
|
||
- name: Build Angular app | ||
working-directory: wowskarma.app | ||
run: ng build --configuration=${{ inputs.build_configuration }} | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wowskarma_app | ||
path: ./wowskarma.app/dist |
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,66 @@ | ||
name: Deploy Preview to Server | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
|
||
permissions: | ||
contents: read | ||
packages: read | ||
deployments: write | ||
|
||
jobs: | ||
# First: Make sure dev build ran fine. | ||
build-test-solution: | ||
name: Build & Test Solution | ||
uses: ./.github/workflows/dotnet-build.yml | ||
|
||
# Build & Package API & Web from 'build-package-api.yml' and 'build-package-web.yml'. | ||
build-package-api: | ||
name: Build & Package API | ||
needs: build-test-solution | ||
uses: ./.github/workflows/build-package-api.yml | ||
with: | ||
build_configuration: 'Preview' | ||
|
||
build-package-web: | ||
name: Build & Package Web App | ||
needs: build-test-solution | ||
uses: ./.github/workflows/build-package-web.yml | ||
with: | ||
build_configuration: 'preview' | ||
|
||
# Deploy to server | ||
deploy-preview: | ||
name: Deploy Preview to server | ||
environment: | ||
name: preview | ||
url: https://preview.wows-karma.com/ | ||
needs: | ||
- build-package-api | ||
- build-package-web | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download packaged API artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wowskarma_api | ||
path: ./api | ||
|
||
- name: Download packaged Web App artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: wowskarma_app | ||
path: ./web | ||
|
||
- name: Install SSH Key | ||
uses: shimataro/ssh-key-action@v2 | ||
with: | ||
key: ${{ secrets.SSH_PRIVATEKEY }} | ||
known_hosts: '*.nodsoft.net' | ||
|
||
- name: Add Known Hosts | ||
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | ||
|
||
- name: Deploy with rsync | ||
run: rsync -rvmzOE . ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:${{ secrets.SSH_DEPLOYPATH }} |
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 |
---|---|---|
|
@@ -371,3 +371,5 @@ wowskarma.app/pnpm-lock.yaml | |
.store/ | ||
|
||
wowskarma.api.minimap/main.py | ||
|
||
WowsKarma.Api/appsettings.Preview.json |
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
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
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
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
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,25 @@ | ||
export const environment = { | ||
name: "preview", | ||
|
||
apiHost: { | ||
EU: "https://api.preview.wows-karma.com", | ||
NA: "https://api.preview.wows-karma.com", | ||
CIS: "https://api.preview.wows-karma.com", | ||
SEA: "https://api.preview.wows-karma.com", | ||
}, | ||
|
||
applicationInsights: { | ||
connectionString: "InstrumentationKey=3fab5b95-b531-4f15-95e9-83f31e2ed531;IngestionEndpoint=https://francecentral-1.in.applicationinsights.azure.com/;LiveEndpoint=https://francecentral.livediagnostics.monitor.azure.com/", | ||
}, | ||
|
||
cookies: { | ||
domain: "localhost", | ||
|
||
name: { | ||
EU: "Auth_EU", | ||
NA: "Auth_NA", | ||
CIS: "Auth_CIS", | ||
SEA: "Auth_SEA", | ||
}, | ||
}, | ||
}; |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export const environment = { | ||
production: true, | ||
name: "production", | ||
|
||
apiHost: { | ||
EU: "https://api.wows-karma.com", | ||
|
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
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