A reusable GitHub Actions workflow that extends the official Walrus Sites pipeline with provenance support. It builds your static site, generates SLSA-compliant provenance, verifies integrity for every file, and deploys to Walrus.
- ✅ Full-chain: build → provenance (SLSA3) → verify → deploy
- ✅ Supports Mainnet & Testnet
- ✅ Publishes
.well-known/walrus-sites.intoto.jsonlautomatically - ✅ Reusable
workflow_calldesign for team-wide adoption
- Sui address:
SUI_ADDRESS(set as environment variable or org variable) - Keystore:
SUI_KEYSTORE(store in GitHub Secrets) site.config.jsonfile in repo root:
{
"path": "dist", // Build output directory (required)
"network": "testnet", // "mainnet" or "testnet"
"epochs": 5 // Retention period in epochs
}
⚠️ Thepathfolder must not already exist when workflow starts.
SUI_KEYSTORE(Secret): must be formatted as a JSON array with one string element, e.g.:
["AXXXXXXXXXXXXXXXXXXXXXXXXX"]SUI_ADDRESS(Variable): the matching Sui address, e.g.0x123...abc.
⚠️ Use a dedicated Sui address per workflow to avoid gas conflicts. Ensure the address is funded with SUI (gas fees) and WAL (storage).
Run the workflow once to deploy your site with provenance.
name: Deploy Walrus Site with Provenance (one-off)
on:
workflow_dispatch:
permissions:
id-token: write
contents: write
actions: read
jobs:
deploy-with-provenance:
uses: zktx-io/walrus-sites-ga/.github/workflows/deploy_with_slsa3.yml@v0.4.7
with:
network: 'testnet' # or 'mainnet'
epochs: 5
SUI_ADDRESS: ${{ vars.SUI_ADDRESS }}
secrets:
SUI_KEYSTORE: ${{ secrets.SUI_KEYSTORE }}To update an existing Walrus Site:
- The workflow reads the site object ID from
ws-resources.jsonin your deploy root, so you don’t need to pass it manually. - Only modified resources are updated, while routes and unchanged files stay intact.
- First deployment: not required
- Updates: required — must exist in
DIST/so the workflow can update the same site. - Location: defaults to
DIST/ws-resources.json. Place it underpublic/in your framework so it auto-copies intoDIST/.
When preparing for updates, make sure to include:
object_id(from the initial deployment)site_namemetadata.linkmetadata.descriptionmetadata.project_url
Example:
{
"object_id": "0x1234abcd...",
"site_name": "My Walrus Site",
"metadata": {
"link": "https://example.com",
"description": "Demo site deployed on Walrus",
"project_url": "https://github.com/example/repo"
}
}If
GITHUB_TOKENis configured, deployments that update this file will open a PR. Merge the PR so theobject_idis stored in your repo and future runs keep updating the same site.
- Build: Runs
npm ci && npm run build(Node 20) - Hash: Computes SHA-256 for all build artifacts (Base64-encoded list)
- Provenance (SLSA3): Generates
walrus-sites.intoto.jsonlvia official SLSA generator - Verify: Uses
slsa-verifierto check every file against provenance - Deploy: Publishes artifacts +
.well-known/walrus-sites.intoto.jsonlto Walrus
| Input | Type | Required | Default | Description |
|---|---|---|---|---|
working-directory |
string | . |
Optional subdirectory to build | |
network |
string | ✔ | testnet | mainnet or testnet |
epochs |
number | ✔ | 5 | Retention in epochs |
SUI_ADDRESS |
string | ✔ | Deployment wallet address |
| Secret | Required | Description |
|---|---|---|
SUI_KEYSTORE |
✔ | Sui keystore (JSON) — in Secrets |
DIST: Path to your built site directory (required if not usingsite.config.json)WALRUS_CONFIG: Custom Walrus configuration (default auto-download)SITES_CONFIG: Custom sites configuration (default auto-download)WS_RESOURCES: Path tows-resources.json(defaults toDIST/ws-resources.json)GITHUB_TOKEN: Enables PRs whenws-resources.jsonchanges
If you want PRs for updated resources, add:
permissions:
contents: write
pull-requests: writeAfter deployment, provenance is published as .well-known/walrus-sites.intoto.jsonl.
You can audit deployments with Walrus Sites Notary:
👉 https://notary.wal.app/site/workflow
- Secrets in GitHub: Convenient, but always risky. Use org secrets/variables and minimize scope.
- Action pinning: Pin all third-party actions to commit SHA.
- Reproducible builds: Lock dependencies, pin Docker digests, ensure consistent environments.
- Dedicated keys: Use a separate Sui address for each workflow to avoid gas conflicts.
- Funding: Ensure your deployment address has both SUI (gas fees) and WAL (storage).
-
“Output folder already exists”
- Ensure the
pathdirectory doesn’t exist before build.
- Ensure the
-
Provenance verification failed
- Likely due to build reproducibility issues. Re-run with locked dependencies.
-
Invalid network/address
- Double-check
network,SUI_ADDRESS, andSUI_KEYSTOREformat.
- Double-check
See example repo with release-triggered deployments: 🔗 https://github.com/zktx-io/walrus-sites-ga-example