Welcome
Getting Started
How to Guides
Application vs Blocklet
Create Blocklet
Compose Blocklets
Develop Blocklet
User and Passport
Communicate with DID Wallet
Blocklet Storage
Using Blocklet Preferences
Build blocklet for profit [deprecated]
Bundle your blocklet
Manage Blocklet Versions
Publish your blocklet to the world
Deploy your blocklet
Read/Write blockchain in blocklet
Operation and maintenance your blocklet
Reference Guides
Conceptual Guides
Frequently Asked Questions
Blocklet GitHub Actions
If you are using GitHub Actions to manage the process of packaging, publishing, and deploying Blocklet applications, then you will more efficient Blocklet application deployment guide in this article.
What is action workflow?#
action-workflow is a quick release process that we have learned from our extensive Blocklet application development practice.
With action-workflow, we can quickly configure the flow in CI for each Blocklet application, saving development time and debugging time cost in CI.
How to use action workflow?#
First your project needs to create a .github
folder to enable the GitHub Actions feature
Then create a workflows/main.yml
file in .github
and configure some necessary initialization processes. Such as git checkout
, dependencies install
, etc.
Once everything is in place, add the following to access the Blocklet action-workflow functionality.
- name: Deploy Blocklet Site
uses: blocklet/action-workflow@v1
with:
skip-deps: false
skip-bundle: false
skip-upload: false
skip-deploy: false
skip-release: false
skip-readme: false
deps-server-version: beta
deps-npm-client: pnpm
working-directory: . /
bundle-command: npm run bundle
store-endpoint: ${{ secrets.STORE_ENDPOINT }}
store-access-token: ${{ secrets.STORE_ACCESS_TOKEN }}
store-developer-did: ${{ secrets.STORE_DEVELOPER_DID }}
server-endpoint: ${{ secrets.XMARK_NODE_ENDPOINT }}
server-access-key: ${{ secrets.XMARK_NODE_ACCESS_KEY }}
server-access-secret: ${{ secrets.XMARK_NODE_ACCESS_SECRET }}
deploy-app-did: xxxxxx
deploy-mount-point: xxxxxx
slack-webhook: xxxxxx
github-token: xxxxx
skip-deps
: Whether to skip the blocklet-server environment preparation step, the default is`false
''skip-bundle
: Whether to skip the bundle step, the default is`false
''skip-upload
: Whether to skip uploading Blocklet applications to Blocklet Store, the default istrue
.skip-deploy
: Whether to skip the step of deploying the Blocklet application to the specified Blocklet Server, the default istrue
.skip-release
: Whether to skip the release Github Release step, the default isfalse
skip-readme
: Whether to skip the step of updating theREADME.md
file, default isfalse
deps-server-version
: Custom@blocklet/cli
version, default islatest
, find more version tags at: https://www.npmjs.com/package/@blocklet/cli?activeTab=versionsdeps-npm-client
Which node package manager do you want to use@blocklet/cli
, the default isyarn
working-directory
: The directory where the Blocklet action-workflow is executed, often used in monorepo, where multiple Blocklet applications need to be packaged, uploaded, and released at the same time, default is. /
bundle-command
: The command to package Blocklet applications, usuallynpm run bundle
, ifskip-bundle
is nottrue
, then this item is requiredstore-endpoint
: The URL of the Blocklet Store, you can freely configure which Blocklet Store you need to upload the application to, ifskip-upload
is nottrue
, then this item is requiredstore-access-token
: The key applied in Blocklet Store, you need to register as the developer of the corresponding Blocklet Store first, then apply for an upload key, ifskip-upload
is nottrue
, then this item is required. For more details, please refer to: Blocklet Storestore-developer-did
: The developer ID of the developer in the corresponding Blocklet Store, this item is required when you need to upload a paid Blocklet. For more details, please refer to: Blocklet Storeserver-endpoint
: The address of the Blocklet Server to be deployed. (ifskip-deploy
is not empty). For more details, please refer to: Blocklet Deployserver-access-key
: Access Key created in Blocklet Server. (ifskip-deploy
is not empty). For more details, please refer to: Blocklet Deployserver-access-secret
: The Access Secret created in Blocklet Server. (ifskip-deploy
is not empty). For more details, please refer to: Blocklet Deploydeploy-app-did
: Under which Blocklet application the current application will be deployed (become its sub-component), if you need to deploy the application as a sub-component, you need to fill in this item. For more details, please refer to: Blocklet Deploydeploy-mount-point
: The path where the application is mounted when it is deployed as a subcomponent, if you need to deploy the application as a subcomponent, you need to fill in this item. For more details, please refer to: Blocklet Deployslack-webhook
: Configure a Slack webhook to send a Slack notification when the Blocklet application is successfully deployed.github-token
: Configure atoken
withwrite
permissions that will be used to update the project'sREADME.md
file in CI