Skip to content

Commit

Permalink
fix: api endpoint and action version
Browse files Browse the repository at this point in the history
  • Loading branch information
TAK848 committed Feb 28, 2024
1 parent b90336f commit 0c3eb3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/deploy_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
ENV: dev
AWS_REGION: ap-northeast-1
AWS_ACCOUNT_ID: 905418376731
API_ENDPOINT: https://api.dev.magi-sche.net

jobs:
build-and-push:
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:
aws-region: ${{ env.AWS_REGION }}

- name: login to ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
id: login-ecr

- id: set_env
Expand Down Expand Up @@ -78,6 +79,8 @@ jobs:
target: runner
platforms: linux/amd64
# platforms: linux/amd64,linux/arm64
build-args: |
NEXT_PUBLIC_API_ENDPOINT=${{ env.API_ENDPOINT }}
deploy:
permissions:
Expand Down Expand Up @@ -113,4 +116,3 @@ jobs:
# MEMORY: 1024
# CPU_ARCHITECTURE: ARM64
CPU_ARCHITECTURE: X86_64
API_ENDPOINT: https://api.dev.magi-sche.net
9 changes: 6 additions & 3 deletions .github/workflows/deploy_prd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
ENV: prd
AWS_REGION: ap-northeast-1
AWS_ACCOUNT_ID: 905418376731
API_ENDPOINT: https://api.magi-sche.org

jobs:
build-and-push:
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:
aws-region: ${{ env.AWS_REGION }}

- name: login to ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2
id: login-ecr

- id: set_env
Expand Down Expand Up @@ -77,7 +78,9 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
target: runner
platforms: linux/amd64
# platforms: linux/amd64,linux/arm64
# platforms: linux/amd64,linux/arm64
build-args: |
NEXT_PUBLIC_API_ENDPOINT=${{ env.API_ENDPOINT }}
deploy:
permissions:
Expand Down Expand Up @@ -113,4 +116,4 @@ jobs:
# MEMORY: 1024
# CPU_ARCHITECTURE: ARM64
CPU_ARCHITECTURE: X86_64
API_ENDPOINT: https://api.magi-sche.net
API_ENDPOINT: https://api.magi-sche.org
4 changes: 1 addition & 3 deletions src/libraries/env.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export const API_ENDPOINT =
process.env.NEXT_PUBLIC_API_ENDPOINT ??
process.env.API_ENDPOINT ??
"http://localhost:8080";
process.env.NEXT_PUBLIC_API_ENDPOINT ?? "http://localhost:8080";

export const CALLBACK_URL_KEY = "redirect_url";

0 comments on commit 0c3eb3c

Please sign in to comment.