diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 82a04dddd..2e2f8cb0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,29 +51,3 @@ jobs: steps: - run: exit 1 if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} - - deploy-docs: - runs-on: blacksmith-4vcpu-ubuntu-2404 - needs: - - done - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} - environment: - name: Docs - url: https://void.cloud - permissions: - contents: read - concurrency: - group: deploy-void-cloud - cancel-in-progress: true - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1.12.0 - with: - node-version-file: .node-version - cache: true - - run: vp install - - run: vp run deploy:docs - env: - VOID_TOKEN: ${{ secrets.VOID_TOKEN }} diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml deleted file mode 100644 index 849cb5dbf..000000000 --- a/.github/workflows/deploy-docs.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Deploy void.cloud - -on: - workflow_dispatch: - -permissions: {} - -concurrency: - group: deploy-void-cloud - cancel-in-progress: true - -jobs: - deploy: - runs-on: blacksmith-4vcpu-ubuntu-2404 - environment: - name: Docs - url: https://void.cloud - permissions: - contents: read - steps: - - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 - with: - persist-credentials: false - - uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # v1.12.0 - with: - node-version-file: .node-version - cache: true - - run: vp install - - run: vp run deploy:docs - env: - VOID_TOKEN: ${{ secrets.VOID_TOKEN }} diff --git a/README.md b/README.md index 9bad6eedd..6f31c9569 100644 --- a/README.md +++ b/README.md @@ -111,17 +111,24 @@ vp run dev:docs # local docs dev server | `docs` | Documentation (VitePress) | | `playground/*` | Test apps for local development | -## GitHub Environments & Secrets +## GitHub Deployment -Deploy and publish workflows require three GitHub environments: +The documentation site deploys from `main` through the Void GitHub App using the +`container` executor. The root [`void.json`](./void.json) configures the monorepo +as a static project that builds `docs` and publishes `docs/.vitepress/dist`. +There is no documentation deploy workflow or `VOID_TOKEN` repository secret. -| Environment | Trigger | Secret | Purpose | -| ----------- | ------- | ------------ | ----------------------------------------------------- | -| `Prod` | `prod` | `VOID_TOKEN` | Auth token for `void deploy` (production docs) | -| `Staging` | `main` | `VOID_TOKEN` | Auth token for `void deploy` (staging docs) | -| `Release` | `v*` | `NPM_TOKEN` | npm publish token via `.github/workflows/publish.yml` | +Connect the repository once with: -Note both prod and staging docs are self-hosted on the **production** environment of the platform, so `VOID_TOKEN` for both Prod and Staging envs should be issued from the production API. +```sh +void github connect void-docs \ + --repo voidzero-dev/void \ + --branch main \ + --executor container +``` + +Release publishing still uses the `Release` GitHub environment with an +`NPM_TOKEN` secret via `.github/workflows/publish.yml`. CI (`ci.yml`) runs on PRs to `main` and requires no secrets. diff --git a/docs/package.json b/docs/package.json index 7d8e447a9..5d16954e4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -4,7 +4,6 @@ "type": "module", "scripts": { "build": "vitepress build", - "deploy": "node ../packages/void/dist/cli/cli.mjs deploy --project void-docs", "dev": "vitepress dev", "preview": "vitepress preview" }, diff --git a/docs/void.json b/docs/void.json deleted file mode 100644 index 5b60f0497..000000000 --- a/docs/void.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "inference": { - "appType": "static", - "outputDir": ".vitepress/dist" - } -} diff --git a/package.json b/package.json index 7a5b1eb9d..2aca8264b 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "build:core": "vp run --filter ./packages/void build", "build:docs": "vp run --filter ./docs build", "check": "vp run -r --parallel typecheck", - "deploy:docs": "vp run build:core && vp run --filter ./docs deploy", "dev:docs": "vp run --filter ./docs dev", "fmt": "vp fmt --write .", "lint": "vp lint", diff --git a/void.json b/void.json new file mode 100644 index 000000000..039da1d59 --- /dev/null +++ b/void.json @@ -0,0 +1,7 @@ +{ + "inference": { + "appType": "static", + "build": "vp run build:docs", + "outputDir": "docs/.vitepress/dist" + } +}