Initial Astro redesign and deploy workflow

This commit is contained in:
2026-04-06 13:00:53 +02:00
parent 5753258ce9
commit aec24d92b6
42 changed files with 8176 additions and 51 deletions
+38 -30
View File
@@ -1,43 +1,51 @@
# Astro Starter Kit: Minimal
# davegilligan-new
```sh
npm create astro@latest -- --template minimal
```
Astro + React islands frontend for `davegilligan.com`.
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
This is the repo that should own the public magazine-style frontend now. It deploys only the static site layer and intentionally leaves these server-side paths alone:
## 🚀 Project Structure
- `api/`
- `admin/`
- `uploads/`
- `matomo/`
- `live/`
- `db/`
- `vendor/`
Inside of your Astro project, you'll see the following folders and files:
## Local commands
```text
/
├── public/
├── src/
│ └── pages/
│ └── index.astro
└── package.json
```
- `npm install`
- `npm run dev`
- `npm run build`
- `npm run preview`
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
## GitHub deploy workflow
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
The workflow lives at `.github/workflows/deploy.yml`.
Any static assets, like images, can be placed in the `public/` directory.
It does four things on every push to `main`:
## 🧞 Commands
1. Builds the Astro site from `dist/`
2. Uploads a tarball of the static build to the server
3. Creates a timestamped backup of the current `public_html`
4. Rsyncs only the static frontend into `public_html`, while protecting backend and upload paths
All commands are run from the root of the project, from a terminal:
## Required GitHub secrets
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
- `SSH_PRIVATE_KEY`
- `REMOTE_HOST`
- `REMOTE_USER`
- `REMOTE_PATH`
- `SSH_PORT`
## 👀 Want to learn more?
Recommended production values for this site:
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
- `REMOTE_HOST=89.167.24.252`
- `REMOTE_PATH=/home/davegilligan/public_html`
- `SSH_PORT=22`
`REMOTE_USER` should be the SSH user that has permission to write to `/home/davegilligan/public_html`.
## Important note
Do not let the old `davegilligan` repo auto-deploy the frontend anymore. That repo still contains the legacy React/PHP site and can overwrite this Astro frontend if its workflow is left active.