Skip to content

Commit f02b23c

Browse files
committed
docs: update
1 parent 30457cd commit f02b23c

3 files changed

Lines changed: 38 additions & 42 deletions

File tree

‎docs/.vitepress/theme/components/HomePage.vue‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
<script setup>
2+
import { withBase } from 'vitepress'
3+
</script>
4+
15
<template>
26
<div class="home ctp-home">
37
<!-- Hero -->
@@ -13,7 +17,7 @@
1317
Simple pipeline, zero server dependencies.
1418
</p>
1519
<div class="hero__actions">
16-
<a href="/guide/getting-started" class="btn btn--primary">Get Started</a>
20+
<a :href="withBase('/guide/getting-started')" class="btn btn--primary">Get Started</a>
1721
<a href="https://github.com/batosai/catapult" class="btn btn--secondary" target="_blank">
1822
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
1923
<path
@@ -24,7 +28,7 @@
2428
</a>
2529
</div>
2630
<div class="hero__install">
27-
<code>npm install @jrmc/catapult</code>
31+
<code>npx @jrmc/catapult init</code>
2832
</div>
2933
</div>
3034
</section>
@@ -85,20 +89,13 @@
8589
<div class="quickstart__steps">
8690
<div class="step">
8791
<div class="step__number">1</div>
88-
<div class="step__content">
89-
<h4>Install</h4>
90-
<pre><code>npm install @jrmc/catapult</code></pre>
91-
</div>
92-
</div>
93-
<div class="step">
94-
<div class="step__number">2</div>
9592
<div class="step__content">
9693
<h4>Init</h4>
97-
<pre><code>cata init</code></pre>
94+
<pre><code>npx @jrmc/catapult init</code></pre>
9895
</div>
9996
</div>
10097
<div class="step">
101-
<div class="step__number">3</div>
98+
<div class="step__number">2</div>
10299
<div class="step__content">
103100
<h4>Configure</h4>
104101
<pre><code><span class="c-keyword">import</span> { defineConfig } <span class="c-keyword">from</span> <span class="c-string">'@jrmc/catapult'</span>
@@ -115,10 +112,10 @@
115112
</div>
116113
</div>
117114
<div class="step">
118-
<div class="step__number">4</div>
115+
<div class="step__number">3</div>
119116
<div class="step__content">
120117
<h4>Deploy</h4>
121-
<pre><code>cata deploy</code></pre>
118+
<pre><code>npx cata deploy</code></pre>
122119
</div>
123120
</div>
124121
</div>

‎docs/guide/getting-started.md‎

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,21 @@
22

33
## Installation
44

5-
```bash
6-
npm install @jrmc/catapult
7-
```
8-
9-
Once installed, the `cata` CLI is available:
5+
Run the following command at the root of your project:
106

117
```bash
12-
cata deploy
8+
npx @jrmc/catapult init
139
```
1410

15-
## Usage
16-
17-
Generate a `deploy.ts` file at the root of your project:
11+
This creates a `deploy.ts` configuration file and installs `@jrmc/catapult` as a dev dependency. Once installed, the `cata` CLI is available:
1812

1913
```bash
20-
cata init
14+
npx cata deploy
2115
```
2216

23-
Or create it manually:
17+
## Configuration
18+
19+
Edit the generated `deploy.ts` file, or create it manually:
2420

2521
```typescript
2622
import { defineConfig } from '@jrmc/catapult'
@@ -39,7 +35,10 @@ await defineConfig({
3935
name: 'staging',
4036
ssh: 'deploy@staging.example.com',
4137
deployPath: '/home/deploy/staging/myapp',
42-
branch: 'develop',
38+
branch: {
39+
name: 'develop',
40+
ask: true,
41+
},
4342
healthcheckUrl: 'http://127.0.0.1:3333/health',
4443
},
4544
{
@@ -59,37 +58,37 @@ await defineConfig({
5958

6059
```bash
6160
# Show the current version
62-
cata version
61+
npx cata version
6362

6463
# Create a deploy.ts configuration file
65-
cata init
66-
67-
# Deploy
68-
cata deploy
64+
npx cata init
6965

7066
# Initial server setup (create directories)
71-
cata deploy:setup
67+
npx cata deploy:setup
68+
69+
# Deploy
70+
npx cata deploy
7271

7372
# Rollback to the previous release
74-
cata rollback
73+
npx cata rollback
7574

7675
# Server status
77-
cata status
76+
npx cata status
7877

7978
# List releases
80-
cata list:releases
79+
npx cata list:releases
8180

8281
# List registered tasks and the current pipeline
83-
cata list:tasks
82+
npx cata list:tasks
8483

8584
# Run a specific task on servers
86-
cata task <task-name>
85+
npx cata task <task-name>
8786

8887
# Target a specific host
89-
cata deploy --host staging
88+
npx cata deploy --host staging
9089

9190
# Override the branch to deploy
92-
cata deploy --branch feature/my-feature
91+
npx cata deploy --branch feature/my-feature
9392
```
9493

9594
## Branch
@@ -125,7 +124,7 @@ hosts: [
125124
You can also override the branch for all hosts at deploy time:
126125

127126
```bash
128-
cata deploy --branch feature/my-feature
127+
npx cata deploy --branch feature/my-feature
129128
```
130129

131130
## Server structure
@@ -171,7 +170,7 @@ hosts: [
171170
Deployment runs sequentially on each host. To target a single host:
172171

173172
```bash
174-
cata deploy --host staging
173+
npx cata deploy --host staging
175174
```
176175

177176
## Automatic rollback

‎docs/guide/pipeline.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ after('deploy:healthcheck', 'notify')
129129
Any registered task — whether built-in, added by a recipe, or defined in `deploy.ts` — can be run directly from the terminal.
130130

131131
```bash
132-
cata task adonisjs:migrate
133-
cata task cache:clear --host staging
132+
npx cata task adonisjs:migrate
133+
npx cata task cache:clear --host staging
134134
```
135135

136136
## Template variables

0 commit comments

Comments
 (0)