From ebf39dcd7a9bd06d81ec5c248c840595cba2483a Mon Sep 17 00:00:00 2001 From: DeveloperRyou Date: Sun, 9 Jun 2024 16:34:12 +0900 Subject: [PATCH 1/2] =?UTF-8?q?FIX:=20Action=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop.yml | 60 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 2 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/develop.yml diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 0000000..762d1c1 --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,60 @@ +name: Run eollugage-fe development deploy + +on: + push: + branches: + - develop + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 21 + + - name: Cache yarn + uses: actions/cache@v3 + id: yarn-cache + with: + path: "**/node_modules" + key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} + + # cache hit 못하면 패키지 설치 + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn install + + - name: Run build test + run: yarn build + + push-to-develop-backend: + runs-on: ubuntu-latest + needs: test + steps: + - name: Checkout develop-backend branch # 'main' 브랜치로 branch checkout + uses: actions/checkout@v2 + with: + ref: "develop-backend" + fetch-depth: "0" + submodules: true + + - name: Configure Git # commit을 위한 git config 설정 + run: | + git config user.name action + + - name: Merge dev branch # develop 브랜치를 merge + run: | + git merge origin/develop --no-edit + + - name: Push changes to main branch # merge 내용들을 main 브랜치로 최종 push + uses: ad-m/github-push-action@master + with: + branch: develop-backend + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f88bc13..cd84d1b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: - develop jobs: - build: + test: runs-on: ubuntu-latest steps: - name: Checkout From 99248428bd43ce432dc1176bbc20dc0b2466d639 Mon Sep 17 00:00:00 2001 From: DeveloperRyou Date: Sun, 9 Jun 2024 16:37:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?FIX:=20backend=20url=20=ED=99=98=EA=B2=BD?= =?UTF-8?q?=EB=B3=80=EC=88=98=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/apis/network.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apis/network.ts b/src/apis/network.ts index eb9ff12..4cbfda6 100644 --- a/src/apis/network.ts +++ b/src/apis/network.ts @@ -17,7 +17,7 @@ const getTokenFromLocalStorage = () => { return accessToken; }; -const eollugageUrl = "https://api.eolluga.com"; +const eollugageUrl = process.env.NEXT_PUBLIC_BACKEND_URL; const api = axios.create({ baseURL: eollugageUrl,