Skip to content

Commit 1dbf490

Browse files
committed
feat(website): add marketing site aligned with v2.4.0 CLI
Adds the Astro-based website under website/ and a GitHub Pages deploy workflow. Content is aligned with the current shipnode CLI: TypeScript shipnode.config.ts (not .conf), full command surface (backup, cloudflare, config, user, run, restart, stop, migrate, upgrade), --config flag for multi-env deploys, and a project-local install widget with npm/pnpm/yarn/bun tabs.
1 parent d574731 commit 1dbf490

26 files changed

Lines changed: 7169 additions & 0 deletions

.github/workflows/website.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy website
2+
3+
on:
4+
push:
5+
branches: [v2]
6+
paths:
7+
- 'website/**'
8+
- '.github/workflows/website.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: pages
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
defaults:
24+
run:
25+
working-directory: website
26+
steps:
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
29+
with:
30+
node-version: '22'
31+
- run: npm ci || npm install
32+
- run: npm run build
33+
env:
34+
GITHUB_ACTIONS: 'true'
35+
- uses: actions/configure-pages@v5
36+
- uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: website/dist
39+
40+
deploy:
41+
needs: build
42+
runs-on: ubuntu-latest
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
steps:
47+
- id: deployment
48+
uses: actions/deploy-pages@v4

website/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# build output
2+
dist/
3+
# generated types
4+
.astro/
5+
6+
# dependencies
7+
node_modules/
8+
9+
# logs
10+
npm-debug.log*
11+
yarn-debug.log*
12+
yarn-error.log*
13+
pnpm-debug.log*
14+
15+
16+
# environment variables
17+
.env
18+
.env.production
19+
20+
# macOS-specific files
21+
.DS_Store
22+
23+
# jetbrains setting folder
24+
.idea/

website/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Astro Starter Kit: Minimal
2+
3+
```sh
4+
npm create astro@latest -- --template minimal
5+
```
6+
7+
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
8+
9+
## 🚀 Project Structure
10+
11+
Inside of your Astro project, you'll see the following folders and files:
12+
13+
```text
14+
/
15+
├── public/
16+
├── src/
17+
│ └── pages/
18+
│ └── index.astro
19+
└── package.json
20+
```
21+
22+
Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name.
23+
24+
There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components.
25+
26+
Any static assets, like images, can be placed in the `public/` directory.
27+
28+
## 🧞 Commands
29+
30+
All commands are run from the root of the project, from a terminal:
31+
32+
| Command | Action |
33+
| :------------------------ | :----------------------------------------------- |
34+
| `npm install` | Installs dependencies |
35+
| `npm run dev` | Starts local dev server at `localhost:4321` |
36+
| `npm run build` | Build your production site to `./dist/` |
37+
| `npm run preview` | Preview your build locally, before deploying |
38+
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
39+
| `npm run astro -- --help` | Get help using the Astro CLI |
40+
41+
## 👀 Want to learn more?
42+
43+
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).

website/astro.config.mjs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// @ts-check
2+
import { defineConfig } from 'astro/config';
3+
4+
const isGitHubPages = process.env.GITHUB_ACTIONS === 'true';
5+
6+
// https://astro.build/config
7+
export default defineConfig({
8+
site: isGitHubPages ? 'https://devalade.github.io' : 'https://shipnode.dev',
9+
base: isGitHubPages ? '/shipnode' : '/',
10+
});

0 commit comments

Comments
 (0)