Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Feat(ops): Add option to deploy to another repository

Jonathan ARNAULT72fdc879dd91
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 63533946..3b3077a8 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -25,7 +25,7 @@ jobs:
VITE_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
VITE_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
VITE_IS_DEMO: ${{ vars.VITE_IS_DEMO }}
-
+ DEPLOY_REPO_URL: ${{ secrets.DEPLOY_REPO_URL }}
steps:
- name: 📥 Checkout repo
diff --git a/README.md b/README.md
index 761b772c..02beac15 100644
--- a/README.md
+++ b/README.md
@@ -91,27 +91,7 @@ You can then access the app via [`http://localhost:3000/`](http://localhost:3000
## GitHub Actions
-This project supports github actions for continuous integration and delivery. To enable GitHub actions on this repo, you will
-have to create the following secrets:
-
-```bash
-SUPABASE_ACCESS_TOKEN: Your personal access token, can be found at https://supabase.com/dashboard/account/tokens
-SUPABASE_DB_PASSWORD: Your supabase database password
-SUPABASE_PROJECT_ID: Your supabase project id
-SUPABASE_URL: Your supabase project URL
-SUPABASE_ANON_KEY: Your supabase project anonymous key
-```
-
-Also, you will need to configure the some variables:
-```bash
-VITE_IS_DEMO: Set to `true` if you want to display the demo banner
-```
-
-You will also need to configure the following environment variables to deploy to GH pages:
-```bash
-GIT_USER_NAME: The deploy account's name
-GIT_USER_EMAIL: The deploy user's email
-```
+Learn how to [configure GitHub Actions for Atomic CRM](./doc/github-actions.md).
## Customizing
diff --git a/doc/github-actions.md b/doc/github-actions.md
new file mode 100644
index 00000000..8c4370b4
--- /dev/null
+++ b/doc/github-actions.md
@@ -0,0 +1,26 @@
+# GitHub Actions
+
+## Configuration
+
+his project supports github actions for continuous integration and delivery. To enable GitHub actions on this repo, you will
+have to create the following secrets:
+
+```bash
+SUPABASE_ACCESS_TOKEN: Your personal access token, can be found at https://supabase.com/dashboard/account/tokens
+SUPABASE_DB_PASSWORD: Your supabase database password
+SUPABASE_PROJECT_ID: Your supabase project id
+SUPABASE_URL: Your supabase project URL
+SUPABASE_ANON_KEY: Your supabase project anonymous key
+```
+
+Also, you will need to configure the some variables:
+```bash
+VITE_IS_DEMO: Set to `true` if you want to display the demo banner
+```
+
+## Deploying to Another Repository
+
+If you want to deploy the static website to another repository, you can configure the following secret on you repository:
+```bash
[email protected]:<org>/<repository>.git
+```
diff --git a/scripts/ghpages-deploy.mjs b/scripts/ghpages-deploy.mjs
index 65adea8f..dade1fe2 100644
--- a/scripts/ghpages-deploy.mjs
+++ b/scripts/ghpages-deploy.mjs
@@ -4,6 +4,7 @@ ghpages.publish(
'dist',
{
branch: 'gh-pages',
+ repo: process.env.DEPLOY_REPO_URL || undefined,
},
function (err) {
if (err) {