Merge pull request #41 from tabi-memo/deploy-vercel #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Vercel | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 8 | |
- name: Install Node.js dependencies | |
run: | | |
pnpm i --frozen-lockfile | |
- name: Pull Vercel Environment Information | |
run: pnpm run vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Build Project Artifacts | |
run: pnpm run vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} | |
- name: Deploy to Vercel | |
run: pnpm run vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} |