From c70265a4017eb8afd300368ec7bc755a39d8aa4d Mon Sep 17 00:00:00 2001 From: michelleyeoh Date: Sun, 18 Jan 2026 17:06:35 -0800 Subject: [PATCH] updated yaml files --- .github/workflows/production.yaml | 30 ++++++++++++++++++++++++------ .github/workflows/staging.yaml | 30 ++++++++++++++++++++++++------ 2 files changed, 48 insertions(+), 12 deletions(-) diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml index 19823802..c227af1e 100644 --- a/.github/workflows/production.yaml +++ b/.github/workflows/production.yaml @@ -19,7 +19,8 @@ jobs: - name: Install node uses: actions/setup-node@v4 with: - node-version: '21.1.0' + node-version: '21.7.3' + cache: 'npm' - name: Install dependencies run: npm install @@ -29,18 +30,35 @@ jobs: env: MONGODB_URI: ${{ secrets.MONGODB_URI }} - - name: Lint and build code, then publish to Vercel - run: npx vercel --token ${{ secrets.VERCEL_TOKEN }} -n ${{ vars.VERCEL_PROJECT }} --yes --prod + - 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 }} + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + + - name: Build Project on Github + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} env: MONGODB_URI: ${{ secrets.MONGODB_URI }} - BASE_URL: ${{ vars.ENV_URL }} AUTH_SECRET: ${{ secrets.AUTH_SECRET }} HMAC_INVITE_SECRET: ${{ secrets.HMAC_INVITE_SECRET }} + SENDER_PWD: ${{ secrets.SENDER_PWD }} + CHECK_IN_CODE: ${{ secrets.CHECK_IN_CODE }} + + BASE_URL: ${{ vars.ENV_URL }} INVITE_TIMEOUT: ${{ vars.INVITE_TIMEOUT }} RESET_TIMEOUT: ${{ vars.RESET_TIMEOUT }} SENDER_EMAIL: ${{ vars.SENDER_EMAIL }} - SENDER_PWD: ${{ secrets.SENDER_PWD }} - CHECK_IN_CODE: ${{ secrets.CHECK_IN_CODE }} + + + - name: Deploy Project to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - name: Success run: echo "🚀 Deploy successful - BLAST OFF WOO! (woot woot) !!! 🐕 🐕 🐕 🚀 " \ No newline at end of file diff --git a/.github/workflows/staging.yaml b/.github/workflows/staging.yaml index e201a8f5..11f15c77 100644 --- a/.github/workflows/staging.yaml +++ b/.github/workflows/staging.yaml @@ -21,7 +21,8 @@ jobs: - name: Install node uses: actions/setup-node@v4 with: - node-version: '21.1.0' + node-version: '21.7.3' + cache: 'npm' - name: Install dependencies run: npm install @@ -31,18 +32,35 @@ jobs: env: MONGODB_URI: ${{ secrets.MONGODB_URI }} - - name: Lint and build code, then publish to Vercel - run: npx vercel --debug --token ${{ secrets.VERCEL_TOKEN }} -n ${{ vars.VERCEL_PROJECT }} --yes --prod + - 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 }} + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + + + - name: Build Project on Github + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} env: MONGODB_URI: ${{ secrets.MONGODB_URI }} - BASE_URL: ${{ vars.ENV_URL }} AUTH_SECRET: ${{ secrets.AUTH_SECRET }} HMAC_INVITE_SECRET: ${{ secrets.HMAC_INVITE_SECRET }} + SENDER_PWD: ${{ secrets.SENDER_PWD }} + CHECK_IN_CODE: ${{ secrets.CHECK_IN_CODE }} + + BASE_URL: ${{ vars.ENV_URL }} INVITE_TIMEOUT: ${{ vars.INVITE_TIMEOUT }} RESET_TIMEOUT: ${{ vars.RESET_TIMEOUT }} SENDER_EMAIL: ${{ vars.SENDER_EMAIL }} - SENDER_PWD: ${{ secrets.SENDER_PWD }} - CHECK_IN_CODE: ${{ secrets.CHECK_IN_CODE }} + + - name: Deploy Project to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} + env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} - name: Success run: echo "🚀 Deploy successful - BLAST OFF WOO! (woot woot) !!! 🐕 🐕 🐕 🚀 "