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: README.md
+55-1Lines changed: 55 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,61 @@ This project is built with:
62
62
63
63
## How can I deploy this project?
64
64
65
-
Simply open [Lovable](https://lovable.dev/projects/7a09674e-4dd6-4c5e-a577-cd08f955ec2f) and click on Share -> Publish.
65
+
This project is configured for deployment to Cloudflare Pages.
66
+
67
+
### Automatic Deployment with GitHub Actions
68
+
69
+
A GitHub Actions workflow (`.github/workflows/cloudflare-pages.yml`) is set up to automatically build and deploy the application whenever changes are pushed to the `main` branch.
70
+
71
+
The workflow performs the following steps:
72
+
73
+
1. Checks out the code
74
+
2. Sets up Node.js and pnpm
75
+
3. Installs dependencies
76
+
4. Builds the application (`pnpm build`)
77
+
5. Deploys the `dist` directory to Cloudflare Pages using `wrangler`
78
+
79
+
To enable automatic deployments, you need to configure secrets and variables in your GitHub repository settings:
80
+
81
+
1. Go to `Settings` > `Secrets and variables` > `Actions`.
82
+
2. Add a repository secret named `CLOUDFLARE_API_TOKEN` containing your Cloudflare API token with Pages permissions.
83
+
3. Add a repository variable named `CLOUDFLARE_ACCOUNT_ID` containing your Cloudflare account ID.
84
+
85
+
Also, ensure the `--project-name` in the workflow file matches your Cloudflare Pages project name (`actorkit-dev`).
86
+
87
+
#### Creating a Cloudflare API Token
88
+
89
+
1. Go to the [Cloudflare dashboard](https://dash.cloudflare.com)
90
+
2. Navigate to `My Profile` > `API Tokens`
91
+
3. Click "Create Token"
92
+
4. Use the "Edit Cloudflare Workers" template or create a custom token with `Account` > `Cloudflare Pages` > `Edit` permission.
93
+
5. Set the Account Resources to include your account.
94
+
6. Create the token and copy it.
95
+
96
+
### Manual Deployment
97
+
98
+
To deploy manually using `wrangler`:
99
+
100
+
1. Ensure `wrangler` is installed (`pnpm install -D wrangler` or `npm install -D wrangler`).
101
+
2. Log in to Cloudflare: `npx wrangler login`
102
+
3. Build the application: `pnpm build`
103
+
4. Deploy using the script: `pnpm cf:deploy` (Make sure the `--project-name` in `package.json` is set to `actorkit-dev`).
104
+
105
+
### Setting Up a New Cloudflare Pages Project
106
+
107
+
If you're setting up a new Cloudflare Pages project:
108
+
109
+
1. Log in to your Cloudflare dashboard.
110
+
2. Go to `Workers & Pages` > `Create application` > `Pages` > `Connect to Git` or `Upload assets`.
111
+
3. If connecting to Git:
112
+
- Select your repository.
113
+
- Choose `Vite` as the framework preset.
114
+
- Ensure the `Build command` is `pnpm build` (or `npm run build`).
115
+
- Ensure the `Build output directory` is `dist`.
116
+
- Set Environment Variables (Production) for `NODE_VERSION` to `18` (or matching your workflow).
117
+
4. If uploading assets:
118
+
- Build the project locally (`pnpm build`).
119
+
- Drag and drop the `dist` folder or use `wrangler` (`pnpm cf:deploy`).
66
120
67
121
## Can I connect a custom domain to my Lovable project?
0 commit comments