Skip to content

Commit

Permalink
Merge pull request #1 from Project263/develop
Browse files Browse the repository at this point in the history
test: add test component
  • Loading branch information
rLukoyanov authored Aug 19, 2024
2 parents 5f476cc + 715a73e commit 623ee75
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 9 deletions.
33 changes: 25 additions & 8 deletions .github/workflows/Deploy Preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

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

steps:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.17.0'
node-version: '18.17.0'

- name: Install dependencies
run: npm install
Expand All @@ -25,10 +25,27 @@ jobs:
run: npm run build

- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
run: |
DEPLOY_URL=$(npx vercel --prod --token $VERCEL_TOKEN --confirm | tail -n 1)
echo "Vercel Deployment URL: $DEPLOY_URL"
echo "DEPLOY_URL=$DEPLOY_URL" >> $GITHUB_ENV
id: vercel-deploy

- name: Comment on Pull Request
uses: actions/github-script@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-args: '--prod'
working-directory: ./
github-token: ${{ secrets.GITHUB_TOKEN }}
scope: ruslanlukoanov0-gmailcom
script: |
const { DEPLOY_URL } = process.env;
const issue_number = context.payload.pull_request.number;
await github.rest.issues.createComment({
issue_number: issue_number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Deployed to Vercel: ${DEPLOY_URL}`
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "eslint . --ext .ts,.tsx,.jsx",
"lint": "eslint . --ext .ts,.tsx,.jsx --max-warnings=0",
"prepare": "husky",
"commitlint": "commitlint --edit"
},
Expand Down
1 change: 1 addition & 0 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable max-len */
import Image from 'next/image';
import styles from './page.module.css';

Expand Down
9 changes: 9 additions & 0 deletions src/components/test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

interface Props {
className?: string;
}

export const Test: React.FC<Props> = ({ className }) => {
return <div className={className}></div>;
};

0 comments on commit 623ee75

Please sign in to comment.