doc(Deployment): Update guides for how to deploy.
This commit is contained in:
parent
fad3d5c601
commit
7c999fdfc2
1 changed files with 17 additions and 13 deletions
30
README.md
30
README.md
|
|
@ -80,22 +80,26 @@ We welcome your contributions and PRs.
|
|||
|
||||
## 🏗️ Deployment
|
||||
|
||||
> Video tutorial: <https://www.youtube.com/watch?v=MkU23U2VE9E>
|
||||
> Video tutorial: [Watch here](https://www.youtube.com/watch?v=MkU23U2VE9E)
|
||||
|
||||
1. [Fork](https://github.com/ccbikai/Sink/fork) the repository to your GitHub account.
|
||||
2. Create a [Cloudflare Pages](https://developers.cloudflare.com/pages/) project.
|
||||
3. Select the `Sink` repository and the `Nuxt.js` preset.
|
||||
4. Configure environment variables.
|
||||
1. `NUXT_SITE_TOKEN` length must exceed **8**.
|
||||
2. `NUXT_CF_ACCOUNT_ID` [find your account ID](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/).
|
||||
3. `NUXT_CF_API_TOKEN` Create a [Cloudflare API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/). This token requires `Account.Account Analytics` permissions at the very least. [Reference.](https://developers.cloudflare.com/analytics/analytics-engine/sql-api/#authentication).
|
||||
2. Create a project in [Cloudflare Pages](https://developers.cloudflare.com/pages/).
|
||||
3. Select the `Sink` repository and choose the `Nuxt.js` preset.
|
||||
4. Configure the following environment variables:
|
||||
- `NUXT_SITE_TOKEN`: Must be longer than **8** characters. This token grants access to your dashboard.
|
||||
- `NUXT_CF_ACCOUNT_ID`: Locate your [account ID](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/).
|
||||
- `NUXT_CF_API_TOKEN`: Create a [Cloudflare API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) with at least `Account.Account Analytics` permissions. [See reference.](https://developers.cloudflare.com/analytics/analytics-engine/sql-api/#authentication)
|
||||
|
||||
5. Save and deploy.
|
||||
6. Cancel the deployment, navigate to `Settings` -> `Functions`.
|
||||
1. KV namespace bindings. Bind the variable name `KV` to a KV namespace.
|
||||
2. Workers AI Bindings. Bind the variable name `AI` to the Workers AI Catalog. _Optional_
|
||||
3. Analytics Engine bindings. Bind the variable name `ANALYTICS` to the `sink` dataset, and enable [Cloudflare Analytics Engine beta](https://developers.cloudflare.com/analytics/analytics-engine/get-started/) for your account.
|
||||
7. Redeploy.
|
||||
5. Save and deploy the project.
|
||||
6. Cancel the deployment, then navigate to **Settings** -> **Bindings** -> **Add**:
|
||||
- **KV Namespace**: Bind the variable name `KV` to a KV namespace (create a new one under **Workers & Pages** -> **KV**).
|
||||
- **Workers AI** (_Optional_): Bind the variable name `AI` to the Workers AI Catalog.
|
||||
- **Analytics Engine**:
|
||||
- In **Workers & Pages**, go to **Account details** on the right side, find `Analytics Engine`, and click `Set up` to enable the free version.
|
||||
- Return to **Settings** -> **Bindings** -> **Add** and select **Analytics engine**.
|
||||
- Bind the variable name `ANALYTICS` to the `sink` dataset.
|
||||
|
||||
7. Redeploy the project.
|
||||
|
||||
## ⚒️ Configuration
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue