https://github.com/zktx-io/walrus-sites-ga
Walrus Site with Github Action
https://github.com/zktx-io/walrus-sites-ga
action dapp github sui walrus
Last synced: about 2 months ago
JSON representation
Walrus Site with Github Action
- Host: GitHub
- URL: https://github.com/zktx-io/walrus-sites-ga
- Owner: zktx-io
- Created: 2024-08-30T04:14:31.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-04-05T10:08:52.000Z (about 2 months ago)
- Last Synced: 2025-04-10T21:07:57.742Z (about 2 months ago)
- Topics: action, dapp, github, sui, walrus
- Homepage: https://github.com/marketplace/actions/walrus-sites-ga
- Size: 31.3 KB
- Stars: 11
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-sui - GitHub - [Marketplace](https://github.com/marketplace/actions/walrus-sites-ga) - [Examples](https://github.com/zktx-io/walrus-sites-ga-example) - [Further Information](details/walrus_sites_ga.md) (Walrus / Smart Contract Toolkits)
- awesome-sui - GitHub - [Marketplace](https://github.com/marketplace/actions/walrus-sites-ga) - [Examples](https://github.com/zktx-io/walrus-sites-ga-example) - [Further Information](details/walrus_sites_ga.md) (Walrus / Smart Contract Toolkits)
README
# Walrus Sites Github Actions
## Reusable GitHub Action for deploying Walrus Sites
This GitHub action allows users to easily deploy their websites to Walrus Sites using a pre-compiled Walrus Site Builder binary. The action automatically downloads the necessary binaries, streamlining the deployment process and making it easy to integrate into any repository.
### Overview
This action simplifies the deployment of sites to Walrus Sites by using a precompiled Walrus Site Builder. Users can deploy their sites without having to manage the build process themselves.
### Key features
1. **Automated Deployment**: Automatically deploys websites to Walrus Sites using a precompiled Site Builder binary.
1. **Easy Configuration**: Allows users to specify configuration files and site paths to meet different deployment needs.
1. **Seamless Integration**: Designed for reuse, this action can be easily added to workflows in different projects.### Inputs
The following inputs are required to configure the deployment process:
+ site-path: (Required)
+ Specifies the path to the directory containing the site files to be deployed. This directory must have an index.html file generated by your web framework at the root.
+ Example: './build'
+ network: (Required)
+ Specifies the network environment to use for the build. Currently only the testnet is supported.
+ Options:
+ testnet (default)
+ Example: 'testnet'
+ epochs: (Optional)
+ Currently on Walrus testnet, the duration of an epoch is 1 day.
+ object-id: (Optional)
+ Specifies the hex-string object ID of the existing site to be updated. If specified, the action will update the existing site instead of publishing a new one. Leave this field blank to publish a new site.
+ wal-exchange-enabled: (Optional)
+ Enables or disables the automatic exchange of WAL tokens during the deployment process. When enabled, WAL tokens will be automatically retrieved using walrus get-wal.
+ Default: true### Environment Variables
The following environment variables should be provided securely using GitHub Secrets to protect sensitive information:
+ SUI_ADDRESS:
+ The Sui blockchain address used to provision the site. This should be a valid hexadecimal string (e.g. 0x...).
+ SUI_KEYSTORE
+ The contents of the Sui keystore file containing the private keys required to sign transactions on the Sui blockchain. This keystore must be formatted according to the Sui binary specifications:
+ The keystore is a JSON array of base64 encoded strings.
+ Each entry in the array represents a key.
+ When base64 decoded, each key is 33 bytes in length.
+ The first byte of the decoded key indicates the key type, followed by a 32-byte private key seed.
+ [Sui Keytool CLI](https://docs.sui.io/references/cli/keytool)
```bash
sui keytool generate ed25519
```### Example Usage
Below is an example of how to use this GitHub action in a workflow file to deploy a site to Walrus Sites:
```yaml
name: Deploy site to Walrus
on:
push:
branches:
- mainjobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4- name: Deploy site to Walrus
uses: zktx-io/walrus-ga@latest
with:
site-path: './build'
network: 'testnet'
env:
SUI_ADDRESS: ${{ vars.SUI_ADDRESS }}
SUI_KEYSTORE: ${{ secrets.SUI_KEYSTORE }}
``````yaml
name: Update site to Walrus
on:
push:
branches:
- mainjobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4- name: Update site to Walrus
uses: zktx-io/walrus-ga@latest
with:
site-path: './build'
network: 'testnet'
object-id: '0xObjectID'
env:
SUI_ADDRESS: ${{ vars.SUI_ADDRESS }}
SUI_KEYSTORE: ${{ secrets.SUI_KEYSTORE }}
```### Example Github
[walrus-sites-ga-example](https://github.com/zktx-io/walrus-sites-ga-example)