Skip to content

Commit

Permalink
Setup github pages and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
KavetiRohith committed Sep 11, 2023
1 parent 47d250d commit 73a5625
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build and Deploy
env:
VITE_RAWG_API_KEY: ${{ secrets.RAWG_API_KEY }}
on:
workflow_dispatch:
push:
branches:
- main
schedule:
- cron: "0 12 * * 1" # see https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install Bun 🔧
uses: oven-sh/setup-bun@v1

- name: Install and Build 🔧 # This example project is built using bun and outputs the result to the 'dist' folder
run: |
bun install
bun run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist # The folder the action should deploy.
branch: gh-pages # The branch the action should deploy to.
Binary file modified bun.lockb
Binary file not shown.
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"homepage": "https://kavetirohith.github.io/GameHub",
"name": "gamehub",
"private": true,
"version": "0.0.0",
Expand All @@ -7,14 +8,17 @@
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
"preview": "vite preview",
"predeploy": "tsc && vite build",
"deploy": "gh-pages -d dist"
},
"dependencies": {
"@chakra-ui/react": "^2.8.1",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"axios": "^1.5.0",
"framer-motion": "^10.16.4",
"gh-pages": "^6.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.11.0"
Expand Down
7 changes: 4 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

// https://vitejs.dev/config/
export default defineConfig({
base: "/GameHub",
plugins: [react()],
})
});

0 comments on commit 73a5625

Please sign in to comment.