From 836a60a296f1a7dbc2a73e9b338684e2b7c5d8fd Mon Sep 17 00:00:00 2001 From: wookki Date: Sat, 23 Dec 2023 13:42:08 +0900 Subject: [PATCH] feat: cd workflow --- .github/workflows/cd.yml | 24 ++++++++++++++++++++++++ .github/workflows/ci.yml | 6 +++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cd.yml diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml new file mode 100644 index 00000000..f0749e62 --- /dev/null +++ b/.github/workflows/cd.yml @@ -0,0 +1,24 @@ +name: CD + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + push: + branches: + - main + - develop + 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 }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5362fcf2..592eb441 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,10 @@ name: CI -on: [pull_request] +on: + pull_request: + branches: + - main + - develop jobs: lint: