Skip to content

Commit

Permalink
removes vercel deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
piscis committed Sep 18, 2024
1 parent 5f29fca commit 9a4296e
Showing 1 changed file with 51 additions and 47 deletions.
98 changes: 51 additions & 47 deletions .github/workflows/cicd-vercel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ jobs:
pnpm nuxi prepare
pnpm run test
build-deploy:
# build-deploy:
build:
timeout-minutes: 10
name: Build 🏗️ & Deploy 🚀
needs: [setup-stage, lint, test]
Expand All @@ -109,49 +110,52 @@ jobs:

- name: Install Deps
run: pnpm install

- name: Pull Vercel Environment Information (Stage)
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
if: contains(fromJson('["staging"]'), needs.setup-stage.outputs.env-name)

- name: Build Project Artifacts (Stage)
run: |
export NITRO_PRESET="vercel"
export NODE_ENV="production"
pnpm run build
vercel build --debug --token=${{ secrets.VERCEL_TOKEN }}
if: contains(fromJson('["staging"]'), needs.setup-stage.outputs.env-name)

- name: Pull Vercel Environment Information (Prod)
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
if: contains(fromJson('["production"]'), needs.setup-stage.outputs.env-name)

- name: Build Project Artifacts (Prod)
run: |
export NITRO_PRESET="vercel"
export NODE_ENV="production"
pnpm run build
vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
if: contains(fromJson('["production"]'), needs.setup-stage.outputs.env-name)

- name: Deploy Project Artifacts to Vercel
id: deploy
run: |
if [[ "${{ needs.setup-stage.outputs.env-name }}" == "production" ]]; then
echo "url=$(vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }})" >> "$GITHUB_OUTPUT"
else
echo "url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> "$GITHUB_OUTPUT"
fi
preview:
timeout-minutes: 1
name: Preview 🔎
needs: [setup-stage, lint, test, build-deploy]
runs-on: ubuntu-latest
environment:
name: ${{ needs.setup-stage.outputs.env-name }}
url: ${{ needs.build-deploy.outputs.url }}
steps:
- run: |
echo "Env: ${{ needs.setup-stage.outputs.env-name }}"
echo "Url: ${{ needs.build-deploy.outputs.url }}"

Check failure on line 113 in .github/workflows/cicd-vercel.yml

View workflow job for this annotation

GitHub Actions / Lint ✅

Trailing spaces not allowed
- name: Build
run: pnpm build

# - name: Pull Vercel Environment Information (Stage)
# run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
# if: contains(fromJson('["staging"]'), needs.setup-stage.outputs.env-name)

# - name: Build Project Artifacts (Stage)
# run: |
# export NITRO_PRESET="vercel"
# export NODE_ENV="production"
# pnpm run build
# vercel build --debug --token=${{ secrets.VERCEL_TOKEN }}
# if: contains(fromJson('["staging"]'), needs.setup-stage.outputs.env-name)

# - name: Pull Vercel Environment Information (Prod)
# run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
# if: contains(fromJson('["production"]'), needs.setup-stage.outputs.env-name)

# - name: Build Project Artifacts (Prod)
# run: |
# export NITRO_PRESET="vercel"
# export NODE_ENV="production"
# pnpm run build
# vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
# if: contains(fromJson('["production"]'), needs.setup-stage.outputs.env-name)

# - name: Deploy Project Artifacts to Vercel
# id: deploy
# run: |
# if [[ "${{ needs.setup-stage.outputs.env-name }}" == "production" ]]; then
# echo "url=$(vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }})" >> "$GITHUB_OUTPUT"
# else
# echo "url=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})" >> "$GITHUB_OUTPUT"
# fi

# preview:
# timeout-minutes: 1
# name: Preview 🔎
# needs: [setup-stage, lint, test, build-deploy]
# runs-on: ubuntu-latest
# environment:
# name: ${{ needs.setup-stage.outputs.env-name }}
# url: ${{ needs.build-deploy.outputs.url }}
# steps:
# - run: |
# echo "Env: ${{ needs.setup-stage.outputs.env-name }}"
# echo "Url: ${{ needs.build-deploy.outputs.url }}"

0 comments on commit 9a4296e

Please sign in to comment.