Diffinery

codician/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

Deploy production from Diffinery (#15)

Deploy and the live test now run on diffinery.com's hosted runners. GitHub
mirrors the repository there through the sync workflow, and a manual Deploy
run on GitHub still deploys as a fallback.


Claude-Session: https://claude.ai/code/session_01AizKXSsengXZRegJxRATkL

Co-authored-by: Claude <noreply@anthropic.com>
Canberk Demirci authored · GitHub committed signed1 parent 7a1eadccommit bcf1e7f7bb06e12fff8964cec24dbc0adaaac6cfBrowse files
3 files changed+14−6
modified.github/workflows/deploy.yml+4−4View file
@@ -18,10 +18,10 @@
1818 jobs:
1919 deploy:
2020 name: Deploy to Cloudflare
21- # Production deploys from one host only. This repository is mirrored to
22- # diffinery.com (see sync-to-diffinery.yml); switch this to
23- # 'https://diffinery.com' to make Diffinery the one that deploys.
24- if: ${{ github.server_url == 'https://github.com' }}
21+ # Production deploys from Diffinery, on its own hosted runners. GitHub
22+ # mirrors this repository there (see sync-to-diffinery.yml); running this
23+ # workflow by hand on GitHub still deploys, as a fallback.
24+ if: ${{ github.server_url == 'https://diffinery.com' || github.event_name == 'workflow_dispatch' }}
2525 runs-on: ubuntu-latest
2626 timeout-minutes: 45
2727 environment:
modified.github/workflows/live-test.yml+1−1View file
@@ -25,7 +25,7 @@
2525 live:
2626 name: Containers, sandboxes, webhooks, schedules and LFS
2727 # Runs on the host that deploys production (see the gate in deploy.yml).
28- if: ${{ github.server_url == 'https://github.com' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success') }}
28+ if: ${{ github.event_name == 'workflow_dispatch' || (github.server_url == 'https://diffinery.com' && github.event.workflow_run.conclusion == 'success') }}
2929 runs-on: ubuntu-latest
3030 timeout-minutes: 30
3131 env:
modifiedREADME.md+9−1View file
@@ -48,7 +48,15 @@
4848
4949 ## Deploying
5050
51-Deploys run from GitHub Actions on every push to `main` (`.github/workflows/deploy.yml`).
51+Diffinery deploys itself: this repository lives at
52+`diffinery.com/codician-team/diffinery`, and every push to `main` there runs
53+`.github/workflows/deploy.yml` on Diffinery's hosted runners, followed by the
54+live test (`.github/workflows/live-test.yml`). GitHub stays the upstream for
55+now: `.github/workflows/sync-to-diffinery.yml` copies every branch and tag, and
56+the secrets and variables below, to Diffinery on each push, then waits for the
57+Actions runs there and fails if any of them fail. Running Deploy by hand on
58+GitHub still deploys, as a fallback.
59+
5260 The workflow needs two repository secrets:
5361
5462 - `CLOUDFLARE_API_TOKEN`: account permissions Workers Scripts, D1, R2,