diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..b2439ac --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,52 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'npm' + - name: Install Dependencies + run: npm install + - name: Build + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: './dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 0d6babe..d40b7dd 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,41 @@ -# React + TypeScript + Vite +# Search Location Map -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. +An interactive map application developed using React, TypeScript, and Leaflet. The project allows users to search for specific locations and dynamically updates the map with a marker. The project is hosted on GitHub Pages and automated using GitHub Actions. -Currently, two official plugins are available: +## ✨Description -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh +This project is an interactive map application built with modern web development tools. It features a responsive design, dynamic zoom and location updates, and custom marker icons. The application integrates with Nominatim for geocoding address searches. -## Expanding the ESLint configuration +## ✨Technology Stack -If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: +- **React:** A JavaScript library for building user interfaces. +- **TypeScript:** A superset of JavaScript that adds static types. +- **Tailwind CSS:** A utility-first CSS framework for rapid UI development. +- **Leaflet:** An open-source JavaScript library for mobile-friendly interactive maps. +- **React-Leaflet:** Integration of Leaflet maps into React applications. +- **GitHub Pages:** Free hosting for personal and project websites. +- **GitHub Actions:** Automate workflows, including build and deployment. -- Configure the top-level `parserOptions` property like this: +## ✨Features -```js -export default { - // other rules... - parserOptions: { - ecmaVersion: 'latest', - sourceType: 'module', - project: ['./tsconfig.json', './tsconfig.node.json'], - tsconfigRootDir: __dirname, - }, -} -``` +- **Interactive Map:** Dynamic zoom and location updates. +- **Geocoding:** Integration with Nominatim for address search. +- **Custom Markers:** Enhanced visual clarity with custom marker icons. +- **Responsive Design:** Optimized for various devices. +- **Modern Tech Stack:** Built with React, TypeScript, and Leaflet. -- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` -- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` -- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list +## ✨Demo + +Check out the live demo of the application [here](https://pshanmukha.github.io/search-location/). + +## ✨Installation + +To run this project locally: +1. Clone the repository: `git clone https://github.com/pshanmukha/search-location.git` +2. Navigate to the project directory: `cd search-location` +3. Install dependencies: `npm install` +4. Start the development server: `npm run dev` + +## ✨Author + +Shanmukha