Skip to content

Commit c834268

Browse files
committed
feat:added github action workflow and also added readme md file
1 parent bb39827 commit c834268

2 files changed

Lines changed: 126 additions & 23 deletions

File tree

.github/workflows/nextjs.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2+
#
3+
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4+
#
5+
name: Deploy Next.js site to Pages
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: ["main"]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
- name: Detect package manager
35+
id: detect-package-manager
36+
run: |
37+
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
38+
echo "manager=yarn" >> $GITHUB_OUTPUT
39+
echo "command=install" >> $GITHUB_OUTPUT
40+
echo "runner=yarn" >> $GITHUB_OUTPUT
41+
exit 0
42+
elif [ -f "${{ github.workspace }}/package.json" ]; then
43+
echo "manager=npm" >> $GITHUB_OUTPUT
44+
echo "command=ci" >> $GITHUB_OUTPUT
45+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
46+
exit 0
47+
else
48+
echo "Unable to determine package manager"
49+
exit 1
50+
fi
51+
- name: Setup Node
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: "20"
55+
cache: ${{ steps.detect-package-manager.outputs.manager }}
56+
- name: Setup Pages
57+
uses: actions/configure-pages@v5
58+
with:
59+
# Automatically inject basePath in your Next.js configuration file and disable
60+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
61+
#
62+
# You may remove this line if you want to manage the configuration yourself.
63+
static_site_generator: next
64+
- name: Restore cache
65+
uses: actions/cache@v4
66+
with:
67+
path: |
68+
.next/cache
69+
# Generate a new cache whenever packages or source files change.
70+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
71+
# If source files changed but packages didn't, rebuild from a prior cache.
72+
restore-keys: |
73+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
74+
- name: Install dependencies
75+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
76+
- name: Build with Next.js
77+
run: ${{ steps.detect-package-manager.outputs.runner }} next build
78+
- name: Upload artifact
79+
uses: actions/upload-pages-artifact@v3
80+
with:
81+
path: ./out
82+
83+
# Deployment job
84+
deploy:
85+
environment:
86+
name: github-pages
87+
url: ${{ steps.deployment.outputs.page_url }}
88+
runs-on: ubuntu-latest
89+
needs: build
90+
steps:
91+
- name: Deploy to GitHub Pages
92+
id: deployment
93+
uses: actions/deploy-pages@v4

README.md

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,46 @@
1-
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
1+
# DevSetup
22

3-
## Getting Started
3+
## Introduction
44

5-
First, run the development server:
5+
**DevSetup** is a web application designed to help developers quickly generate installation scripts for their development environment. By selecting the operating system (Windows, macOS, or Linux) and package manager (e.g., Chocolatey, Homebrew, APT), developers can easily choose the tools they need and generate a script to install them.
66

7-
```bash
8-
npm run dev
9-
# or
10-
yarn dev
11-
# or
12-
pnpm dev
13-
# or
14-
bun dev
15-
```
7+
Whether you’re setting up a new machine or just need to install a set of tools, DevSetup streamlines the process by automating the creation of installation scripts.
8+
9+
## Features
10+
11+
- **Select OS and Package Manager**: Choose between Windows, macOS, or Linux and then select your preferred package manager.
12+
- **Tool Selection**: Browse a variety of development tools categorized by type and select the ones you need.
13+
- **Script Generation**: Automatically generate a script based on your selections.
14+
- **Copy & Download**: Copy the generated script to the clipboard or download it as a file.
1615

17-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
16+
## Tech Stack
1817

19-
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
18+
- **Frontend**: React (with hooks), TypeScript
19+
- **Excel Parsing**: [XLSX.js](https://github.com/SheetJS/sheetjs)
20+
- **CSS**: TailwindCSS (for styling)
2021

21-
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
22+
## How It Works
2223

23-
## Learn More
24+
1. **Load Tools Data**: The app loads a list of tools and their installation commands from an Excel file (`tools.xlsx`).
25+
2. **Tool Categories**: Tools are grouped into categories such as 'Development', 'Databases', 'Web Servers', etc.
26+
3. **OS and Package Manager Selection**: The user selects their operating system (Windows, macOS, Linux) and package manager (e.g., `choco`, `winget`, `apt`, etc.).
27+
4. **Tool Selection**: The user selects tools they want to install from a variety of categories.
28+
5. **Script Generation**: The app generates a script with the corresponding installation commands for the selected tools and package manager.
29+
6. **Copy/Download**: The generated script can be copied to the clipboard or downloaded as a `.sh` file.
2430

25-
To learn more about Next.js, take a look at the following resources:
31+
## Demo
2632

27-
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
28-
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
33+
Visit our website to try the tool live:
2934

30-
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
35+
[DevSetup Demo](https://devsetup.example.com) *(Replace with the actual URL once live)*
3136

32-
## Deploy on Vercel
37+
## Installation
3338

34-
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
39+
### Clone the Repo
3540

36-
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
41+
To run **DevSetup** locally, clone the repository and install dependencies:
42+
43+
```bash
44+
git clone https://github.com/yourusername/devsetup.git
45+
cd devsetup
46+
npm install

0 commit comments

Comments
 (0)