Skip to content

Commit 9bee736

Browse files
authored
ci: deploy with ipfs-deploy-action to storacha (#2001)
* ci: add workflow to deploy docs to storacha * fix: build command * fix: path of build * use custom version * fix: bump action * bump action * bump action * bump action * bump action * chore: use v1 major release --------- Co-authored-by: Daniel N <2color@users.noreply.github.com>
1 parent ba7cdf6 commit 9bee736

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/build.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build and Deploy to IPFS
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
statuses: write
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
outputs: # This exposes the CID output of the action to the rest of the workflow
17+
cid: ${{ steps.deploy.outputs.cid }}
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '20'
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Build project
32+
run: npm run docs:build
33+
34+
- uses: ipfs/ipfs-deploy-action@v1
35+
name: Deploy to IPFS
36+
id: deploy
37+
with:
38+
path-to-deploy: docs/.vuepress/dist
39+
storacha-key: ${{ secrets.STORACHA_KEY }}
40+
storacha-proof: ${{ secrets.STORACHA_PROOF }}
41+
github-token: ${{ github.token }}

0 commit comments

Comments
 (0)