From baf2cb296c88e6ae040ed45517f9ae375c960b16 Mon Sep 17 00:00:00 2001 From: Dan Motpan <24751897+SirReaDy@users.noreply.github.com> Date: Tue, 20 Oct 2026 18:39:35 +0300 Subject: [PATCH] Rebuild ipaforge.com by itself The site is built from docs/installing.md, docs/releases/ and the error texts in en.json. A change to those on main now asks the site repository to rebuild (website.yml, event app-docs-changed), and so does every release, from the release workflow's last step (app-released): a release published with the workflow's own token starts no other workflow. Both use SITE_DISPATCH_TOKEN, a fine-grained token for IPAForge/ipaforge.github.io only; without it they log a warning and do nothing. --- .github/workflows/release.yml | 12 ++++++++++++ .github/workflows/website.yml | 32 ++++++++++++++++++++++++++++++++ AGENTS.md | 3 ++- docs/contributing.md | 4 ++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/website.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2af1d4c5..90e4563a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -176,3 +176,15 @@ jobs: --notes-file "$notes" \ $prerelease fi + # ipaforge.com shows the latest version and its notes: ask it to rebuild (SITE_DISPATCH_TOKEN, see + # website.yml). A release published with this workflow's token starts no other workflow, so it's asked here. + - name: Ask ipaforge.com to rebuild + if: startsWith(github.ref, 'refs/tags/') + env: + GH_TOKEN: ${{ secrets.SITE_DISPATCH_TOKEN }} + run: | + if [ -z "$GH_TOKEN" ]; then + echo "::warning::SITE_DISPATCH_TOKEN is not set: ipaforge.com was not asked to rebuild." + exit 0 + fi + gh api repos/IPAForge/ipaforge.github.io/dispatches -f event_type=app-released diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml new file mode 100644 index 00000000..bcaf180d --- /dev/null +++ b/.github/workflows/website.yml @@ -0,0 +1,32 @@ +# Keeps ipaforge.com up to date: the site is built from this repository's install guide, release notes and error +# texts, so a change to them on main asks the site repository to rebuild (a release asks too, from release.yml: +# a release published with the workflow's own token starts no other workflow). That needs SITE_DISPATCH_TOKEN, a +# fine-grained token allowed to write the contents of IPAForge/ipaforge.github.io (only that repository); without +# it the run says so and does nothing. +name: Website + +on: + push: + branches: [main] + paths: + - docs/installing.md + - docs/releases/** + - packages/ui/src/locales/en.json + workflow_dispatch: + +permissions: {} + +jobs: + rebuild: + runs-on: ubuntu-latest + steps: + - name: Ask ipaforge.com to rebuild + env: + GH_TOKEN: ${{ secrets.SITE_DISPATCH_TOKEN }} + run: | + if [ -z "$GH_TOKEN" ]; then + echo "::warning::SITE_DISPATCH_TOKEN is not set: ipaforge.com was not asked to rebuild." + exit 0 + fi + gh api repos/IPAForge/ipaforge.github.io/dispatches -f event_type=app-docs-changed + echo "Asked ipaforge.com to rebuild." diff --git a/AGENTS.md b/AGENTS.md index 770bd7e1..5be44e19 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -67,7 +67,8 @@ ipaforge/ | `apps/desktop/src/renderer/engine-port.ts` | Renderer: receives the ports and wraps each in a `Transport` for `createEngineClient` and `createUpdateClient` | | `apps/desktop/src/renderer/main.tsx` | Electron renderer: connects the `EngineClient` and the update client, then mounts `@ipaforge/ui` with the browser services and a hash history | | `apps/desktop/electron-builder.yml` | Installers (DMG and zip, NSIS and MSI, AppImage, deb, rpm) and the update metadata: `pnpm --filter @ipaforge/desktop dist` | -| `.github/workflows/release.yml` | On a `v*` tag: builds the installers on all three systems and publishes the GitHub release (notes from `docs/releases/.md`) | +| `.github/workflows/release.yml` | On a `v*` tag: builds the installers on all three systems and publishes the GitHub release (notes from `docs/releases/.md`), then asks ipaforge.com to rebuild | +| `.github/workflows/website.yml` | A change on `main` to what ipaforge.com is built from (install guide, release notes, error texts) asks the site repository to rebuild (`SITE_DISPATCH_TOKEN`) | | `apps/desktop/electron.vite.config.ts` | electron-vite builds for main, preload and renderer (`pnpm --filter @ipaforge/desktop dev` / `build`) | | `packages/ui/src/services/engine/fake/fake-engine.ts` | The fake Engine the browser dev host and UI tests use (`?scenario=` in dev) | | `packages/installer/src/application/device-watch.ts` | The device feed (usbmuxd `Listen`, reconnect, fallback polling) behind `engine.watchDevices` | diff --git a/docs/contributing.md b/docs/contributing.md index 63b5e6d6..c19f509f 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -135,6 +135,10 @@ The workflow checks that the tag matches the version, builds the installers on m The macOS app is signed with IPAForge's self-signed certificate (secrets `MAC_CODESIGN_P12` and `MAC_CODESIGN_PASSWORD`; `apps/desktop/build/after-sign.mjs`). Keep using the same certificate: its SHA-1 is pinned in the workflow, and a new one would make every user's keychain ask again. Local builds and forks stay ad-hoc signed. A version with a pre-release part (`-alpha`, `-beta`, `-rc`) is published as a pre-release. To try the installers locally: `pnpm --filter @ipaforge/desktop dist` (this system only; output in `apps/desktop/release/`). +### The website + +[ipaforge.com](https://ipaforge.com) is built in its own repository (`IPAForge/ipaforge.github.io`) from this one's `docs/installing.md`, `docs/releases/` and the error texts in `packages/ui/src/locales/en.json`. It rebuilds by itself: a change to those on `main` runs `.github/workflows/website.yml`, and a published release asks from `release.yml`'s last step. Both send the site repository a `repository_dispatch` event with the secret `SITE_DISPATCH_TOKEN`: a fine-grained token, resource owner IPAForge, for `IPAForge/ipaforge.github.io` only, with Contents read and write. Without it they log a warning and the site waits for its own next change, or a manual run of its Deploy workflow. + ## Clean-room policy Use public specs and permissively licensed projects (libimobiledevice docs, SideStore, rcodesign, zsign) as **references**. Never copy code from other sideloading tools, from GPL/AGPL projects (e.g. ldid) or from proprietary-licensed ones (e.g. ipa-resign).