Skip to content

Commit

Permalink
feat: implement yaml script to deploy react app on orphan branch
Browse files Browse the repository at this point in the history
  • Loading branch information
0xabdulkhaliq committed May 15, 2024
1 parent 22a7d03 commit 0ef9c28
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy-react-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy React App

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm install

- name: Build React app
run: npm run build

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist
clean: true
single-commit: true
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<br>
<p>
❯ &nbsp;
<a href="https://cv-application-0xabdulkhalid.vercel.app/">View Demo</a>
<a href="https://0xabdulkhalid.github.io/cv-application/">View Demo</a>
&nbsp;·&nbsp;
<a href="https://github.com/0xabdulkhalid/cv-application/issues">Report Bug</a>
&nbsp;·&nbsp;
Expand Down Expand Up @@ -46,7 +46,7 @@
## Installation

> [!NOTE]
> If you prefer not to install it locally, you can also access the [live demo](https://cv-application-0xabdulkhalid.vercel.app/) version
> If you prefer not to install it locally, you can also access the [live demo](https://0xabdulkhalid.github.io/cv-application/) version
To set up the CV Application locally, follow these steps:

Expand Down Expand Up @@ -86,7 +86,7 @@ To set up the CV Application locally, follow these steps:
| |
| <img src='./design/pagespeed-insights-score.svg' alt=''> |
| |
| Check out [**Pagespeed Insights**](https://pagespeed.web.dev/analysis/https-cv-application-0xabdulkhalid-vercel-app/02v5pjdoui?form_factor=mobile) to get live score |
| Check out [**Pagespeed Insights**](https://pagespeed.web.dev/analysis/https-0xabdulkhalid-github-io-cv-application/hijg2l98gu?form_factor=mobile) to get live score |
||

<br>
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link
rel="canonical"
href="https://cv-application-0xabdulkhalid.vercel.app/"
href="https://0xabdulkhalid.github.io/cv-application/"
/>
<title>CV Application</title>
</head>
Expand Down
1 change: 1 addition & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: '/cv-application/',
})

0 comments on commit 0ef9c28

Please sign in to comment.