From 8f3339e3cacb0431eb5062f145731b69a5577cac Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:35:24 +0900 Subject: [PATCH 1/4] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 2 ++ .github/workflows/production.yaml | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 72421852..270f8342 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -7,6 +7,8 @@ on: branches: - dev pull_request: + branches-ignore: + - main types: - opened jobs: diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 0f4bf1d7..2fe27c70 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -3,7 +3,7 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: - push: + pull_request: branches: - main jobs: @@ -13,6 +13,8 @@ jobs: - uses: actions/checkout@v2 - name: Install Vercel CLI run: npm install --global vercel@latest + - name: Install pnpm + run: npm install -g pnpm - name: Pull Vercel Environment Information run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts From 4c35418131f44542043beeafe89aa6a434c627cd Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:41:16 +0900 Subject: [PATCH 2/4] =?UTF-8?q?Deploy:=20yaml=20=ED=8C=8C=EC=9D=BC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 3 --- .github/workflows/production.yaml | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 270f8342..bbe26993 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -3,9 +3,6 @@ env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} on: - push: - branches: - - dev pull_request: branches-ignore: - main diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 2fe27c70..7f14cdf2 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -20,6 +20,9 @@ jobs: - 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 }} + id: deploy + run: | + DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') + echo "::set-output name=url::$DEPLOY_URL" - name: Set Fixed Domain Alias - run: vercel alias set https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From 1299fee9cadf5a6434c1da724add7c17b8460729 Mon Sep 17 00:00:00 2001 From: sue Date: Wed, 3 Jan 2024 19:50:49 +0900 Subject: [PATCH 3/4] =?UTF-8?q?Deploy:=20production.ymal=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/production.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 7f14cdf2..18aae280 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -22,7 +22,7 @@ jobs: - name: Deploy Project Artifacts to Vercel id: deploy run: | - DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') + DEPLOY_URL=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') echo "::set-output name=url::$DEPLOY_URL" - name: Set Fixed Domain Alias run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} From 042f80cdcc4d111f373e5454c0f5083252adc3ee Mon Sep 17 00:00:00 2001 From: Hojin Date: Wed, 3 Jan 2024 19:55:13 +0900 Subject: [PATCH 4/4] =?UTF-8?q?Env:=20=EA=B9=83=ED=97=99=EC=95=A1=EC=85=98?= =?UTF-8?q?=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/production.yaml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 18aae280..d8ade6dc 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -1,4 +1,4 @@ -name: Vercel Production Deployment +name: GitHub Actions Vercel Preview Deployment env: VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} @@ -7,22 +7,19 @@ on: branches: - main jobs: - Deploy-Production: + Deploy-Preview: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install Vercel CLI - run: npm install --global vercel@latest + run: npm install --global vercel@canary - name: Install pnpm run: npm install -g pnpm - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - id: deploy - run: | - DEPLOY_URL=$(vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} | grep -o 'https://[^ ]*') - echo "::set-output name=url::$DEPLOY_URL" + run: vercel deploy --token=${{ secrets.VERCEL_TOKEN }} - name: Set Fixed Domain Alias - run: vercel alias set ${{ steps.deploy.outputs.url }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }} + run: vercel alias ${{ env.VERCEL_URL }} https://weplanplans-dev.vercel.app/ --token=${{ secrets.VERCEL_TOKEN }}