aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml41
-rw-r--r--apps/web/README.md2
-rw-r--r--apps/web/wrangler.toml2
3 files changed, 2 insertions, 43 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 26989559..1e1ca656 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -15,52 +15,13 @@ on:
- 'apps/cf-ai-backend/**'
jobs:
- prepare:
- runs-on: ubuntu-latest
- outputs:
- web_changed: ${{ steps.detect_changes.outputs.web_changed }}
- extension_changed: ${{ steps.detect_changes.outputs.extension_changed }}
- cf_ai_backend_changed: ${{ steps.detect_changes.outputs.cf_ai_backend_changed }}
- steps:
- - uses: actions/checkout@v3
- - name: Fetching all history for all tags and branches
- run: git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- - name: Detect Changes
- id: detect_changes
- run: |
- WEB_CHANGED="false"
- EXTENSION_CHANGED="false"
- CF_AI_BACKEND_CHANGED="false"
- if [ "${{ github.event_name }}" = "push" ]; then
- DIFF_REF="${{ github.event.before }} ${{ github.sha }}"
- else
- DIFF_REF="${{ github.base_ref }}...${{ github.head_ref }}"
- fi
- if git diff --name-only $DIFF_REF | grep -q 'apps/web/'; then
- WEB_CHANGED="true"
- fi
- if git diff --name-only $DIFF_REF | grep -q 'apps/extension/'; then
- EXTENSION_CHANGED="true"
- fi
- if git diff --name-only $DIFF_REF | grep -q 'apps/cf-ai-backend/'; then
- CF_AI_BACKEND_CHANGED="true"
- fi
- echo "web_changed=$WEB_CHANGED" >> $GITHUB_OUTPUT
- echo "extension_changed=$EXTENSION_CHANGED" >> $GITHUB_OUTPUT
- echo "cf_ai_backend_changed=$CF_AI_BACKEND_CHANGED" >> $GITHUB_OUTPUT
- echo "Differences detected: WEB=$WEB_CHANGED, EXTENSION=$EXTENSION_CHANGED, CF_AI_BACKEND=$CF_AI_BACKEND_CHANGED"
-
build-extension:
- needs: prepare
- if: needs.prepare.outputs.extension_changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/buildextension
build-app:
- needs: prepare
- if: needs.prepare.outputs.web_changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
@@ -98,8 +59,6 @@ jobs:
branch: main
deploy-cf-worker:
- needs: prepare
- if: needs.prepare.outputs.cf_ai_backend_changed == 'true'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
diff --git a/apps/web/README.md b/apps/web/README.md
index 42da305a..c81448e4 100644
--- a/apps/web/README.md
+++ b/apps/web/README.md
@@ -65,4 +65,4 @@ In order to enable the example:
After doing this you can run the `dev` or `preview` script and visit the `/api/hello` route to see the example in action.
-Finally, if you also want to see the example work in the deployed application make sure to add a `MY_KV_NAMESPACE` binding to your Pages application in its [dashboard kv bindings settings section](https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/settings/functions#kv_namespace_bindings_section). After having configured it make sure to re-deploy your application.
+Finally, if you also want to see the example work in the deployed application make sure to add a `MY_KV_NAMESPACE` binding to your Pages application in its [dashboard kv bindings settings section](https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/settings/functions#kv_namespace_bindings_section). After having configured it make sure to re-deploy your application. \ No newline at end of file
diff --git a/apps/web/wrangler.toml b/apps/web/wrangler.toml
index 6630b0d0..12619fdb 100644
--- a/apps/web/wrangler.toml
+++ b/apps/web/wrangler.toml
@@ -9,4 +9,4 @@ index_name = "anycontext-idx"
[[d1_databases]]
binding = "DATABASE"
database_name = "dev-d1-anycontext"
-database_id = "fc562605-157a-4f60-b439-2a24ffed5b4c" \ No newline at end of file
+database_id = "fc562605-157a-4f60-b439-2a24ffed5b4c"