Skip to content

feat: add product api #16

feat: add product api

feat: add product api #16

name: Build and Deploy to Vercel
on:
push:
branches: ["master"]
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.author.name, 'GitHub Action')"
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: 'true'
token: ${{ secrets.ACTION_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run build
- name: Save Build Artifacts
uses: actions/upload-artifact@v2
with:
name: build-artifacts
path: |
build/**/*
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
submodules: 'true'
token: ${{ secrets.ACTION_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Download Build Artifacts
uses: actions/download-artifact@v2
with:
name: build-artifacts
path: build
- name: Deploy to Vercel
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
github-token: ${{ secrets.ACTION_TOKEN }} # Optional
vercel-args: '--prod' # Optional
vercel-org-id: ${{ secrets.ORG_ID }} # Required
vercel-project-id: ${{ secrets.PROJECT_ID }} # Required
working-directory: ./ # Your Working Directory, Optional