• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

web3-storage/add-to-web3: ⁂ Github Action to upload your website to web3.storag ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

web3-storage/add-to-web3

开源软件地址:

https://github.com/web3-storage/add-to-web3

开源编程语言:

JavaScript 100.0%

开源软件介绍:


web3.storage

Add a directory to web3.storage from an Action, and output it's IPFS Content ID.

Example usage

uses: web3-storage/add-to-web3@v2
id: web3
with:
  web3_token: ${{ secrets.WEB3_STORAGE_TOKEN }}
  path_to_add: 'dist'

# "bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am"
- run: echo ${{ steps.web3.outputs.cid }}

# "https://dweb.link/ipfs/bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am"
- run: echo ${{ steps.web3.outputs.url }}

Inputs

path_to_add

Required The path the root directory of your static website or other content that you want to publish to IPFS.

web3_token

Required API token for web3.storage

Show advanced options: wrap_with_directory, include_hidden, web3_api

wrap_with_directory

Default false

Should the path_to_add be wrapped in a diretory when creating the IPFS DAG. For most folks using this action the default of false is fine.

This is the opposite of the default that web3.storage uses, as this action is commonly used to add a directory that contains a static website to IPFS. In that case you want the path_to_add to become the root cid so you can host your site at https://<cid>.ipfs.dweb.link rather than https://<cid>.ipfs.dweb.link/<path_to_add>.

If you do want to capture the path_to_add path itself in the IPFS DAG then you want to set wrap_with_directory:true.

see: https://web3.storage/docs/reference/js-client-library#parameters

include_hidden

Default false

Should hidden files prefixed with a . be included when found in the path_to_add

see: https://github.com/web3-storage/files-from-path#filesfrompath

web3_api

Default https://api.web3.storage

Useful for testing against staging deployments by setting to the api origin of your choice.

Outputs

cid

The IPFS content ID for the directory on IPFS. e.g. bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am

url

The IPFS gateway URL for the directory e.g. https://dweb.link/ipfs/bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am

Contibuting


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap