-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy workflow tool updated; cli adjustment; new docs
- Loading branch information
Showing
6 changed files
with
104 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## Além CLI | ||
|
||
Além has its own command system. | ||
|
||
### Commands | ||
|
||
```bash | ||
Usage: alem [options] [command] | ||
|
||
Options: | ||
-V, --version output the version number | ||
-h, --help display help for command | ||
|
||
Commands: | ||
dev Run the development server | ||
build Build the project | ||
deploy Deploy the project | ||
upload-data Upload data to SocialDB (app name, description, icon, tags, etc) | ||
``` | ||
|
||
#### Command: `dev` | ||
|
||
Run the development server with various options: | ||
|
||
```bash | ||
Usage: alem dev [options] | ||
|
||
Options: | ||
-p, --port <port> Port to run the server on (default: 8080) | ||
-no-open Disable opening the browser (default: false) | ||
``` | ||
|
||
#### Command: `build` | ||
|
||
Build the project: | ||
|
||
```bash | ||
Usage: bos build | ||
``` | ||
|
||
This will output valid widget code to the `/build` directory. | ||
|
||
#### Command: `deploy` | ||
|
||
Deploy the project to Near BOS: | ||
|
||
```bash | ||
Usage: bos deploy | ||
``` | ||
|
||
#### Command: `upload-data` | ||
|
||
Upload data to SocialDB. This is going to use the data provided by `bos.config.json` file. The content represents the app's details like `name, description, icon, tags, etc`. You can update this information manually by going to the widget metadata tab using the [Near Sandbox](https://near.org/sandbox). | ||
|
||
```bash | ||
Usage: bos upload-data | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## Deploying App With GitHub Actions | ||
|
||
To deploy widgets on push to branch, create a GitHub Actions workflow file in your repository, e.g., `.github/workflows/deploy-embeds-mainnet.yml`, and configure it as follows: | ||
|
||
```yaml | ||
name: Deploy DApp to Mainnet | ||
|
||
on: | ||
push: | ||
branches: [main] # branch for trigger | ||
|
||
jobs: | ||
deploy-mainnet: | ||
uses: wpdas/alem/.github/workflows/deploy.yml@main | ||
with: | ||
deploy-env: "mainnet" # environemnt to deploy to | ||
signer-account-address: <SIGNER_ACCOUNT_ID> # account to sign with (should match bos.config.json > account) | ||
signer-public-key: <SIGNER_PUBLIC_KEY> | ||
secrets: | ||
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }} # must be inside the github repo secrets | ||
``` | ||
Adjust the workflow as needed, then configure your variables + secrets on GitHub Settings -> Actions -> secrets & variables. Use [near-cli-rs](https://github.com/near/near-cli-rs) for generating keypairs. You can also login using Near CLI and check the keypairs locally. | ||
### Workflow Inputs | ||
The workflow accepts the following inputs: | ||
- `cli-version` (optional): Version of BOS CLI to use for deployment (e.g., 0.3.0). Default: "0.3.6" | ||
|
||
- `deploy-env` (optional): Environment to deploy component code to (e.g., mainnet, testnet). Default: "mainnet" | ||
|
||
- `signer-account-address` (required): Account under which component code should be deployed and used for signing the deploy transaction. | ||
|
||
- `signer-public-key` (required): Public key for signing transactions in the format: `ed25519:<public_key>`. | ||
|
||
- `signer-private-key` (required): Private key for signing transactions in the format: `ed25519:<private_key>`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters