Skip to content

Commit

Permalink
Ops, npm instead of yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
Beserrovsky committed Sep 3, 2023
1 parent 9167df1 commit 61c4daf
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 35 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
# .github/workflows/deploy.yml
name: deploy
name: Vercel Production Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches:
- main
workflow_dispatch:
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
jobs:
deploy:
Deploy-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: yarn install --immutable
- run: yarn vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- run: yarn vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
- run: yarn vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
- 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 }}
34 changes: 15 additions & 19 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
# .github/workflows/preview.yml
name: preview
on:
pull_request:
workflow_dispatch:
name: Vercel Preview Deployment
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches-ignore:
- main
jobs:
preview:
Deploy-Preview:
runs-on: ubuntu-latest
environment:
name: preview
url: ${{ steps.deploy.outputs.url }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- run: yarn install --immutable
- run: yarn vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
- run: yarn vercel build --token=${{ secrets.VERCEL_TOKEN }}
- id: deploy
run: echo "::set-output name=url::$(yarn vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})"
- 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 }}
- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

0 comments on commit 61c4daf

Please sign in to comment.