Skip to content

Commit

Permalink
add workflow for deployment to vercel
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrowns committed Jan 23, 2023
1 parent 1aa1430 commit 2009faf
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 22 deletions.
Empty file.
23 changes: 23 additions & 0 deletions .github/workflows/react-app-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI For React Application To Vercel
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
Deploy-To-Production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Vercel CLI
run: npm install --global vercel@canary
- name: Pull Vercel Environent Info
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 }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.vercel
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
<title>rac-tuk</title>
</head>
<body>
<div id="root"></div>
Expand Down
24 changes: 3 additions & 21 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,12 @@ import reactLogo from './assets/react.svg'
import './App.css'

function App() {
const [count, setCount] = useState(0)

return (
<div className="App">
<div>
<a href="https://vitejs.dev" target="_blank">
<img src="/vite.svg" className="logo" alt="Vite logo" />
</a>
<a href="https://reactjs.org" target="_blank">
<img src={reactLogo} className="logo react" alt="React logo" />
</a>
</div>
<h1>Vite + React</h1>
<div className="card">
<button onClick={() => setCount((count) => count + 1)}>
count is {count}
</button>
<p>
Edit <code>src/App.jsx</code> and save to test HMR
</p>
</div>
<p className="read-the-docs">
Click on the Vite and React logos to learn more
</p>
<h1>Rotaract Club of TUK</h1>
<span>Site Under development</span>
<a href='https://github.com/Godwin254/rac-tuk'> Visit Github Repo</a>
</div>
)
}
Expand Down

0 comments on commit 2009faf

Please sign in to comment.