From 185079cb1ad244b0ac07f3b9df0b2ebae45da635 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 17:39:33 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Deploy:=20preview=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/preview.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml new file mode 100644 index 00000000..26539ae2 --- /dev/null +++ b/.github/workflows/preview.yaml @@ -0,0 +1,21 @@ +name: GitHub Actions Vercel Preview Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches-ignore: + - main +jobs: + Deploy-Preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Vercel CLI + run: npm install --global vercel@canary + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} From 34ec5bb383e2b988d5e16aad79e5837f6a74727d Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 17:45:47 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Deploy:=20preview=20=EC=9E=AC=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 26539ae2..bdf86495 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -19,3 +19,17 @@ jobs: run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' # 또는 원하는 버전 + - name: Install pnpm + run: npm install -g pnpm + - name: Install dependencies + run: pnpm install + - name: Build + run: vercel build --token ${{ secrets.VERCEL_TOKEN }} From 7e783ab49276d17bff24fbbbb2703198bcf8bbc1 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 17:51:04 +0900 Subject: [PATCH 3/4] =?UTF-8?q?Deploy:=20preview=20=EC=9E=AC=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index bdf86495..4f0be09a 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -13,23 +13,11 @@ jobs: - uses: actions/checkout@v3 - name: Install Vercel CLI run: npm install --global vercel@canary + - name: Install pnpm + run: npm install -g pnpm - name: Pull Vercel Environment Information run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' # 또는 원하는 버전 - - name: Install pnpm - run: npm install -g pnpm - - name: Install dependencies - run: pnpm install - - name: Build - run: vercel build --token ${{ secrets.VERCEL_TOKEN }} From ddf844599418fb140a2e96201513114780aebabd Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 18:08:15 +0900 Subject: [PATCH 4/4] =?UTF-8?q?Deploy:=20preview=20on=20=EC=9E=AC=EC=84=A4?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 7 +++++-- .github/workflows/production.yaml | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/production.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 4f0be09a..72421852 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -4,8 +4,11 @@ env: VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: push: - branches-ignore: - - main + branches: + - dev + pull_request: + types: + - opened jobs: Deploy-Preview: runs-on: ubuntu-latest diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml new file mode 100644 index 00000000..fff08a6c --- /dev/null +++ b/.github/workflows/production.yaml @@ -0,0 +1,22 @@ +name: Vercel Production Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + branches: + - main +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Vercel CLI + run: npm install --global vercel@latest + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ + secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}