Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
31 changes: 0 additions & 31 deletions .github/workflows/deploy-docs.yml

This file was deleted.

23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down
6 changes: 0 additions & 6 deletions docs/void.json

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions void.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"inference": {
"appType": "static",
"build": "vp run build:docs",
"outputDir": "docs/.vitepress/dist"
}
}