update readme for using the template properly
Some checks failed
Build and Deploy Node App / build-and-deploy (push) Failing after 6s
Some checks failed
Build and Deploy Node App / build-and-deploy (push) Failing after 6s
This commit is contained in:
parent
5f0f17e628
commit
bfe19a125e
109
README.md
109
README.md
@ -1,64 +1,65 @@
|
|||||||
# 🚀 Your Personal Web Dev Lab
|
# 🚀 The CI/CD Magic Template
|
||||||
|
|
||||||
Welcome to your automated web development sandbox! This repository is connected directly to a robotic server. Whenever you push your code here, the server will automatically build your website and put it on the internet.
|
Welcome to your deployment engine! This repository contains the "magic" `.gitea` folder that tells our server how to automatically build your website and put it on the internet.
|
||||||
|
|
||||||
|
Because modern tools (like Vite, Next.js, or Astro) create their own brand-new folders when you scaffold them, you **will not** write your code directly inside this template.
|
||||||
|
|
||||||
|
**Instead, you will create your app normally, and then "inject" the magic folder into it.**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🛠️ How to Start a New Project
|
||||||
|
|
||||||
|
**1. Scaffold your new website**
|
||||||
|
Open your terminal and generate your new app (for example, a Vite React app).
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm create vite@latest my-new-site -- --template react
|
||||||
|
cd my-new-site
|
||||||
|
pnpm install
|
||||||
|
```
|
||||||
|
|
||||||
|
**2. Download this template**
|
||||||
|
Open your file explorer, or use another terminal, and clone this template to your computer:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone [https://git.pynixworld.com/Moody6/node-app-builder-template.git](https://git.pynixworld.com/Moody6/node-app-builder-template.git)
|
||||||
|
```
|
||||||
|
|
||||||
|
**3. Inject the Magic**
|
||||||
|
Open the `node-app-builder-template` folder you just downloaded. Copy the hidden `.gitea` folder, and paste it directly into the _root_ your new `my-new-site` folder.
|
||||||
|
_(Important: The `.gitea` folder must sit right next to your `package.json` file!)_
|
||||||
|
|
||||||
|
**4. Connect to the Server**
|
||||||
|
Go to the Gitea website and create a brand new, empty repository. Then, go back to your `my-new-site` terminal and run these commands to link them:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git init
|
||||||
|
git checkout -b dev # We always start in the Dev environment!
|
||||||
|
git remote add origin [https://git.pynixworld.com/YOUR_USERNAME/YOUR_NEW_REPO.git](https://git.pynixworld.com/YOUR_USERNAME/YOUR_NEW_REPO.git)
|
||||||
|
```
|
||||||
|
|
||||||
|
**5. Launch It!**
|
||||||
|
Add your files, commit, and push. The server will take over from here.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit with deployment magic"
|
||||||
|
git push -u origin dev
|
||||||
|
```
|
||||||
|
|
||||||
|
_(Wait about 15 seconds, then check https://builder.pynixworld.com!)_
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🌍 The Two Worlds (Environments)
|
## 🌍 The Two Worlds (Environments)
|
||||||
|
|
||||||
This repository uses **Branches** to decide where your website goes.
|
This pipeline uses **Branches** to decide where your website goes.
|
||||||
|
|
||||||
- 🛠️ **The `dev` branch (Staging):** Pushing to this branch sends your site to [https://builder.pynixworld.com](https://builder.pynixworld.com). This is your playground. Break things, test new colors, and experiment here!
|
- 🛠️ **The `dev` branch (Staging):** Pushing to this branch sends your site to [https://builder.pynixworld.com](https://builder.pynixworld.com). This is your playground. Break things, test new colors, and experiment here!
|
||||||
- 🌟 **The `main` branch (Production):** Pushing to this branch sends your site to [https://www.pynixworld.com](https://www.pynixworld.com). This is your official, live portfolio for the world to see.
|
- 🌟 **The `main` branch (Production):** Pushing to this branch sends your site to [https://www.pynixworld.com](https://www.pynixworld.com). This is your official, live portfolio for the world to see.
|
||||||
|
|
||||||
---
|
To push to production, just merge your `dev` branch into `main` and push!
|
||||||
|
|
||||||
## 💻 How to Get Started
|
|
||||||
|
|
||||||
**1. Clone this repository to your computer**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone [https://git.pynixworld.com/Moody6/node-app-builder-template.git](https://git.pynixworld.com/Moody6/node-app-builder-template.git)
|
|
||||||
cd node-app-builder-template
|
|
||||||
```
|
|
||||||
|
|
||||||
**2. Switch to your playground branch**
|
|
||||||
Always do your messy work here first!
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git checkout -b dev
|
|
||||||
```
|
|
||||||
|
|
||||||
**3. Install the packages**
|
|
||||||
(We recommend `pnpm` because it is super fast!)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm install
|
|
||||||
```
|
|
||||||
|
|
||||||
**4. Start coding**
|
|
||||||
Run the local server to see your changes live on your computer as you type:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
pnpm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 How to Put Your Site on the Internet
|
|
||||||
|
|
||||||
When you are ready to see your site on your actual domain name, just commit and push!
|
|
||||||
|
|
||||||
**To update the Test Site (`builder.pynixworld.com`):**
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git add .
|
|
||||||
git commit -m "Added a cool new button"
|
|
||||||
git push origin dev
|
|
||||||
```
|
|
||||||
|
|
||||||
_(Wait about 15 seconds, then refresh your browser!)_
|
|
||||||
|
|
||||||
**To update the Live Site (`www.pynixworld.com`):**
|
|
||||||
When your test site looks perfect, merge your code into the main branch to show the world.
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git checkout main
|
git checkout main
|
||||||
@ -70,7 +71,7 @@ git push origin main
|
|||||||
|
|
||||||
## 🧰 Changing Frameworks?
|
## 🧰 Changing Frameworks?
|
||||||
|
|
||||||
This template is ready for **React, SvelteKit, Vue, or Astro** right out of the box.
|
This pipeline is set for **React, SvelteKit, Vue, or Astro** right out of the box.
|
||||||
|
|
||||||
If you decide to try a different framework like Create React App, Next.js, or SvelteKit, you just need to tell the server which folder to look for.
|
If you decide to try a different framework like Create React App, Next.js, or SvelteKit, you just need to tell the server which folder to look for.
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user