diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a2e2ef..3c7df4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,23 @@ jobs: with: name: cypress-screenshots path: ./cypress/videos/ - update-resume-gist: + build-and-deploy: needs: run-tests runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' + 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 }} + update-resume-gist: + needs: build-and-deploy + runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v3 diff --git a/.github/workflows/vercel-preview.yml b/.github/workflows/vercel-preview.yml index f75c963..297f3cf 100644 --- a/.github/workflows/vercel-preview.yml +++ b/.github/workflows/vercel-preview.yml @@ -7,15 +7,15 @@ on: branches-ignore: - main jobs: - Deploy-Preview: + 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=preview --token=${{ secrets.VERCEL_TOKEN }} + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} - name: Build Project Artifacts - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}