diff --git a/.github/workflows/Backend - Build and Deploy.yml b/.github/workflows/Backend - Build and Deploy.yml index 083afda..2dc857d 100644 --- a/.github/workflows/Backend - Build and Deploy.yml +++ b/.github/workflows/Backend - Build and Deploy.yml @@ -3,6 +3,9 @@ name: Backend - Build and Deploy on: push: branches: [main, develop, devops] + paths-ignore: + - "Client/**" #偵測目錄 + - ".github/workflows/Front-End.yml" #偵測檔案" pull_request: diff --git a/.github/workflows/Front-End.yml b/.github/workflows/Front-End.yml index 6993ff2..0a14df8 100644 --- a/.github/workflows/Front-End.yml +++ b/.github/workflows/Front-End.yml @@ -10,6 +10,7 @@ on: branches: [main, devops, feature/Front-End-To-GitHub-Pages] #偵測分支 paths: - "Client/**" #偵測目錄 + - ".github/workflows/Front-End.yml" #偵測檔案" jobs: deploy-to-github-pages: diff --git a/Server/Program.cs b/Server/Program.cs index 00c600b..75a08de 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -78,7 +78,7 @@ string frontendBaseUrl = app.Configuration["FrontendBaseUrl"]!.ToString(); - var url = $@"{frontendBaseUrl}/games/{gameId}"; + var url = $@"{frontendBaseUrl}games/{gameId}"; await context.Response.WriteAsync(url); }).RequireAuthorization(); diff --git a/Test/ServerTests/AcceptanceTests/CreateGameTest.cs b/Test/ServerTests/AcceptanceTests/CreateGameTest.cs index 9ba2ca9..18d66b8 100644 --- a/Test/ServerTests/AcceptanceTests/CreateGameTest.cs +++ b/Test/ServerTests/AcceptanceTests/CreateGameTest.cs @@ -63,7 +63,7 @@ public async Task 建立遊戲成功() var jwt = jwtTokenService.GenerateJwtToken(jwtBearerOptions.Audience, "idA"); string gameId = "1"; - string expected = $"https://localhost:7047/{gameId}"; + string expected = $"https://localhost:7047/games/{gameId}"; // Act server.Client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", jwt);