Skip to content

Commit

Permalink
Merge pull request #54 from ai-cfia/53-update-vercel-deployment-to-ad…
Browse files Browse the repository at this point in the history
…d-setup-node-step
  • Loading branch information
vivalareda authored Dec 12, 2023
2 parents 93e5b44 + d4996c6 commit 1b24dbd
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/workflow-vercel-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: Vercel Static Frontend Deployment



on:
workflow_call:
inputs:
Expand All @@ -13,7 +11,6 @@ on:
type: string
description: 'Deployment environment (dev, prd, uat)'


env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
Expand All @@ -29,15 +26,31 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: checkout code
uses: actions/checkout@v3

- name: install node
uses: actions/setup-node@v3
with:
cache: npm
node-version-file: "package.json"

- name: install npm
run: npm install -g [email protected]

- name: Install Vercel CLI
run: npm install --global vercel@latest

- 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: echo "DEPLOYMENT_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> $GITHUB_ENV

- name: Set URL to dev environment
run: vc alias "$DEPLOYMENT_URL" ${{ env.VERCEL_PROJECT_NAME }}-${{ env.DEPLOYMENT_ENVIRONMENT }}.vercel.app --token=${{ secrets.VERCEL_TOKEN }}

Expand Down

0 comments on commit 1b24dbd

Please sign in to comment.