Skip to content

Commit

Permalink
update github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mhShohan committed Feb 25, 2024
1 parent f3c4e9b commit 9476fe3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
36 changes: 16 additions & 20 deletions .github/workflows/client.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: Inventory Client Deployment

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push:
paths:
Expand All @@ -8,30 +12,22 @@ on:
- main

jobs:
build-and-deploy:
Deploy-Production:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 14
- name: Install Vercel CLI
run: npm install --global vercel

- name: Change Directory to Client
run: cd ./client
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}

- name: Install dependencies
run: npm install
- name: change to client directory
run: cd ./client

- name: Build
run: npm run build
- name: Build Project Artifacts
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy to Vercel
uses: amondnet/vercel-deployment@v1
with:
vercel_token: ${{ secrets.VERCEL_TOKEN }}
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel_scope: ${{ secrets.VERCEL_SCOPE }}
- name: Deploy Project Artifacts
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
2 changes: 1 addition & 1 deletion client/src/pages/managements/PurchaseManagementPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { PaginationProps, TableColumnsType } from 'antd';
import { Button, Flex, Modal, Pagination, Table } from 'antd';
import { useState } from 'react';
import { FieldValues, useForm } from 'react-hook-form';
import { useGetAllPurchasesQuery } from '../../redux/features/purchaseApi';
import { useGetAllPurchasesQuery } from '../../redux/features/management/purchaseApi';
import { IProduct } from '../../types/product.types';
import { IPurchase } from '../../types/purchase.types';
import formatDate from '../../utils/formatDate';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { baseApi } from "./baseApi";
import { baseApi } from "../baseApi";

const purchaseApi = baseApi.injectEndpoints({
endpoints: (builder) => ({
Expand Down

0 comments on commit 9476fe3

Please sign in to comment.