-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ece0dfb
Showing
35 changed files
with
1,404 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# These are supported funding model platforms | ||
|
||
github: [hanzlamateen] | ||
open_collective: react-gh-pages-boilerplate |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build project | ||
run: npm run build | ||
|
||
- name: Upload production-ready build files | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: production-files | ||
path: ./dist | ||
|
||
deploy: | ||
name: Deploy | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check for Secret availability | ||
id: secret-check | ||
# perform secret check & put boolean result as an output | ||
shell: bash | ||
run: | | ||
if [ "${{ secrets.GITHUB_TOKEN }}" != '' ]; then | ||
echo "available=false" >> $GITHUB_OUTPUT; | ||
else | ||
echo "available=true" >> $GITHUB_OUTPUT; | ||
fi | ||
- name: Download artifact | ||
uses: actions/download-artifact@v3 | ||
if: ${{ steps.secret-check.outputs.available == 'true' }} | ||
with: | ||
name: production-files | ||
path: ./dist | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
if: ${{ steps.secret-check.outputs.available == 'true' }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
**/node_modules/** | ||
**/*.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"printWidth": 120, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"quoteProps": "as-needed", | ||
"jsxSingleQuote": false, | ||
"trailingComma": "none", | ||
"bracketSpacing": true, | ||
"bracketSameLine": false, | ||
"arrowParens": "always", | ||
"proseWrap": "never", | ||
"endOfLine": "lf", | ||
"importOrder": ["<THIRD_PARTY_MODULES>", "", "", "^[./]"], | ||
"plugins": ["prettier-plugin-organize-imports", "@ianvs/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"], | ||
"tailwindFunctions": ["twMerge"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024 Hanzla Mateen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<img src=".github/images/banner.svg" width="100%" /> | ||
|
||
<br> | ||
|
||
<p> | ||
React GitHub Pages Boilerplate uses <a href="https://facebook.github.io/react/">React</a>, <a href="https://pages.github.com/">GH-Pages</a>, <a href="https://vitejs.dev/">Vite</a>, <a href="https://tailwindcss.com/">Tailwind</a>, <a href="https://daisyui.com/">DaisyUI</a>, <a href="https://animate.style/">Animate.css</a>. | ||
</p> | ||
|
||
<br> | ||
|
||
<div align="center"> | ||
|
||
[![Build Status][github-actions-status]][github-actions-url] | ||
[![Github Tag][github-tag-image]][github-tag-url] | ||
[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/Fjy3vfgy5q) | ||
|
||
[![OpenCollective](https://opencollective.com/react-gh-pages-boilerplate/backers/badge.svg)](#backers) | ||
[![OpenCollective](https://opencollective.com/react-gh-pages-boilerplate/sponsors/badge.svg)](#sponsors) | ||
[![StackOverflow][stackoverflow-img]][stackoverflow-url] | ||
|
||
</div> | ||
|
||
## Install | ||
|
||
Clone the repo and install dependencies: | ||
|
||
```bash | ||
git clone --depth 1 --branch main https://github.com/hanzlamateen/react-gh-pages-boilerplate.git your-project-name | ||
cd your-project-name | ||
npm install | ||
``` | ||
|
||
## Starting Development | ||
|
||
Start the app in the `dev` environment: | ||
|
||
```bash | ||
npm run dev | ||
``` | ||
|
||
## Packaging for Production | ||
|
||
To create a production build in `dist` folder: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
## Test a Production Build | ||
|
||
Start the dev server and test production build: | ||
|
||
```bash | ||
npm run preview | ||
``` | ||
|
||
## Back Us | ||
|
||
Support us with a monthly donation and help us continue our activities. | ||
|
||
<a href="https://opencollective.com/react-gh-pages-boilerplate#backer" target="_blank"><img src=".github/images/backer.svg"></a> | ||
|
||
## Sponsor Us | ||
|
||
<a href="https://opencollective.com/react-gh-pages-boilerplate#sponsor" target="_blank"><img src=".github/images/sponsor.svg"></a> | ||
|
||
## References | ||
|
||
- <https://github.com/daisyui/react-daisyui> | ||
- <https://stackblitz.com/edit/daisyui-react-vite-62pzsn> | ||
- <https://www.vddeveloper.online/blog/vite-react-deploy-github> | ||
- <https://leerob.io/blog/nextjs-sitemap-robots> | ||
- <https://react-icons.github.io/react-icons/> | ||
|
||
## Maintainers | ||
|
||
- [Hanzla Mateen](https://github.com/hanzlamateen) | ||
|
||
## License | ||
|
||
MIT © [Hanzla Mateen](https://github.com/hanzlamateen) | ||
|
||
[github-actions-status]: https://github.com/hanzlamateen/react-gh-pages-boilerplate/workflows/Deploy/badge.svg | ||
[github-actions-url]: https://github.com/hanzlamateen/react-gh-pages-boilerplate/actions | ||
[github-tag-image]: https://img.shields.io/github/tag/hanzlamateen/react-gh-pages-boilerplate.svg?label=version | ||
[github-tag-url]: https://github.com/hanzlamateen/react-gh-pages-boilerplate/releases/latest | ||
[stackoverflow-img]: https://img.shields.io/badge/stackoverflow-react_gh_pages_boilerplate-blue.svg | ||
[stackoverflow-url]: https://stackoverflow.com/questions/tagged/react-gh-pages-boilerplate |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/assets/favicon.png" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Hello React Github Pages</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.