You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/content/1.docs/1.getting-started/3.deploy.md
+27
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,33 @@ The command will:
67
67
You can also install the [NuxtHub CLI](https://github.com/nuxt-hub/cli) globally with: `npm i -g nuxthub`.
68
68
::
69
69
70
+
### Usage with CI/CD
71
+
72
+
::tip
73
+
If you are using GitHub for your project, jump to the [Github Action](#github-action) section.
74
+
::
75
+
76
+
::important
77
+
The `nuxthub deploy` command is designed to run **non-interactively** in CI/CD environments. It won’t prompt for additional input (such as logging in or linking the project). As long as the required environment variables are set, deployment will proceed automatically.
78
+
::
79
+
80
+
To integrate the `nuxthub deploy` command within your CI/CD pipeline, set the following environment variables:
81
+
-`NUXT_HUB_PROJECT_KEY` – Your project key available in:
82
+
- Your project settings in the [NuxtHub Admin](https://admin.hub.nuxt.com)
83
+
- Your `.env` file (if you ran `npx nuxthub link`)
84
+
-`NUXT_HUB_USER_TOKEN` – Your personal token, available in **User settings** → **Tokens** in the [NuxtHub Admin](https://admin.hub.nuxt.com)
This will authenticate your user and link your NuxtHub project for deployment.
92
+
93
+
::note
94
+
For security, **do not hardcode these values**. Instead, store them as environment variables in your CI/CD pipeline.
95
+
::
96
+
70
97
## GitHub Action
71
98
72
99
After linking a GitHub repository to your project, NuxtHub automatically adds a GitHub Actions workflow to automatically deploy your application on every commit using the [NuxtHub GitHub Action](https://github.com/marketplace/actions/deploy-to-nuxthub).
0 commit comments