From 9b5d145335fd0269fd4284259162a5efdff38e4e Mon Sep 17 00:00:00 2001 From: Felix-Asante Date: Sat, 6 Jan 2024 00:58:28 +0100 Subject: [PATCH] gha added to deploy app to prod --- .github/workflows/deploy-prod.yml | 30 ++++++++++++++++++++++++++++ .github/workflows/deploy-staging.yml | 15 -------------- 2 files changed, 30 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/deploy-prod.yml delete mode 100644 .github/workflows/deploy-staging.yml diff --git a/.github/workflows/deploy-prod.yml b/.github/workflows/deploy-prod.yml new file mode 100644 index 0000000..e975a39 --- /dev/null +++ b/.github/workflows/deploy-prod.yml @@ -0,0 +1,30 @@ +name: Deploy to vercel production + +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on : + push: + branches: + main +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + name: Checkout Repository + uses: actions/checkout@v4 + + name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: "18" + + 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: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/deploy-staging.yml b/.github/workflows/deploy-staging.yml deleted file mode 100644 index a126948..0000000 --- a/.github/workflows/deploy-staging.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: 'Deploy to staging' -on : - push: - branches: - dev -jobs: - name: build the application - runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 - with: - node-version: "18" - run : npm ci - run : npm run start \ No newline at end of file