-
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.
tweak make target names for symmetry
- Loading branch information
Showing
2 changed files
with
58 additions
and
92 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
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 |
---|---|---|
@@ -1,109 +1,74 @@ | ||
# getabc.sh | ||
|
||
Web site for abc (AI bash/zsh/tcsh Command) | ||
This repo contains the website for <https://getabc.sh/> | ||
|
||
For the actual `abc` software, see <https://github.com/alestic/abc> | ||
|
||
## Development Workflow | ||
|
||
The project uses a Makefile to standardize development workflows, organized in a logical progression. The build system requires `npm` and `node` to be installed on your system. | ||
The project uses a Makefile to standardize development workflows. The build system requires `npm` and `node` to be installed on your system. | ||
|
||
### 1. Setup and Environment | ||
```bash | ||
# First-time setup or reset environment | ||
make setup | ||
|
||
# Clean all artifacts and dependencies | ||
make clean | ||
``` | ||
|
||
### 2. Development | ||
```bash | ||
# Start development server | ||
make dev | ||
## Project Structure | ||
|
||
# Run linting and type checks | ||
make check | ||
``` | ||
This website is a Next.js project using: | ||
- TypeScript for type safety | ||
- ESLint for code quality | ||
- TailwindCSS for styling | ||
- GitHub Pages for deployment | ||
|
||
### 3. Production Testing | ||
## Setup / Cleanup | ||
|
||
There are two ways to test production builds: | ||
Setup/reset the development environment: | ||
|
||
#### Local Testing | ||
To test the production build locally without GitHub Pages paths: | ||
```bash | ||
# Build static files for local testing | ||
make build-local | ||
|
||
# Start local production server | ||
make start | ||
make setup | ||
``` | ||
This will serve the site at http://localhost:3000 without GitHub Pages-specific paths. | ||
|
||
#### GitHub Pages Preview | ||
To preview how the site will look on GitHub Pages: | ||
```bash | ||
# Build static files with GitHub Pages configuration | ||
make build-gh-pages | ||
Clean all artifacts and dependencies: | ||
|
||
# Preview the GitHub Pages version locally | ||
make preview-gh-pages | ||
```bash | ||
make clean | ||
``` | ||
This will serve the site at http://localhost:3000 with GitHub Pages paths configured. | ||
|
||
### 4. Deployment | ||
## Development | ||
|
||
Deployment to GitHub Pages is fully automated using GitHub Actions. Simply push your changes to the `main` branch: | ||
Start the development server with hot-reload for real-time changes: | ||
|
||
```bash | ||
git add . | ||
git commit -m "Your commit message" | ||
git push origin main | ||
make serve-dev | ||
``` | ||
|
||
The GitHub Actions workflow will: | ||
1. Build the site with GitHub Pages configuration | ||
2. Deploy to GitHub Pages automatically | ||
3. Make the site available at your GitHub Pages URL | ||
This will run the site at http://localhost:3000 with live updates as you modify the code, making it ideal for active development. | ||
|
||
## Project Structure | ||
Before committing changes, run the checks: | ||
|
||
This is a Next.js project using: | ||
- TypeScript for type safety | ||
- ESLint for code quality | ||
- TailwindCSS for styling | ||
- GitHub Pages for deployment | ||
```bash | ||
make checks | ||
``` | ||
This will run the linter and type checker to ensure code quality. | ||
|
||
## Build Configuration | ||
## Production Testing | ||
|
||
The project uses Next.js static exports with specific configurations: | ||
To test how the site will behave in the actual production environment: | ||
|
||
```bash | ||
# Build static files (generates production-optimized static assets) | ||
make build-static | ||
|
||
### Development | ||
- Local development server runs at the root path | ||
- Images are unoptimized for compatibility with static export | ||
# Start production server to preview the static build | ||
make serve-static | ||
``` | ||
|
||
### Production | ||
- Builds as static export (`output: 'export'`) | ||
- Two build modes: | ||
1. Local testing: Serves from root path | ||
2. GitHub Pages: Uses configured base path and asset prefix | ||
- Production builds include: | ||
- Static file optimization | ||
- Proper path handling | ||
- `.nojekyll` file for GitHub Pages | ||
This will serve the production-equivalent build at http://localhost:3001, allowing you to verify how the site will actually appear and function when deployed. | ||
|
||
## Build Process Details | ||
## Deployment | ||
|
||
### Local Testing Build | ||
The local testing build (`make build-local`): | ||
1. Builds static files to `out-local/` | ||
2. Configures for root path serving | ||
3. Optimizes for local testing | ||
Deployment to GitHub Pages is automated using GitHub Actions. Simply push your changes to the `main` branch: | ||
|
||
### GitHub Pages Build | ||
The GitHub Pages build (`make build-gh-pages`): | ||
1. Builds static files to `out/` | ||
2. Configures base path and asset prefix for GitHub Pages | ||
3. Adds `.nojekyll` file to bypass GitHub Pages processing | ||
4. Optimizes for GitHub Pages hosting | ||
```bash | ||
git add [files]... | ||
git commit -m "Your commit message" | ||
git push | ||
``` | ||
|
||
The automated GitHub Actions deployment uses the GitHub Pages build configuration and handles all deployment steps automatically when you push to the main branch. | ||
The GitHub Actions workflow will automatically build and deploy the site to GitHub Pages. |