feat: deploy to ipfs from gh actions (#234)

* feat: add ipfs deploy action

* ci: add permissions to workflow

* ci: run deploy workflow on all commits to main

---------

Co-authored-by: Daniel N <2color@users.noreply.github.com>
This commit is contained in:
Daniel Norman
2025-02-26 16:48:43 +01:00
committed by GitHub
parent 34b6b356a7
commit 890be23803

View File

@@ -1,17 +1,20 @@
name: js-peer build
permissions:
contents: read
pull-requests: write
statuses: write
on:
push:
branches: [main]
paths:
- 'js-peer/**'
branches: [main] # Deploy every commit so we can CIDs for every commit on main
pull_request:
branches: [main]
paths:
- 'js-peer/**'
- 'js-peer/**' # only run for PRs changing js-peer
jobs:
build-frontend:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
@@ -24,3 +27,11 @@ jobs:
- run: npm ci
- run: npm run lint
- run: npm run build
- uses: ipfs/ipfs-deploy-action@v1
name: Deploy to IPFS
id: deploy
with:
path-to-deploy: out
storacha-key: ${{ secrets.STORACHA_KEY }}
storacha-proof: ${{ secrets.STORACHA_PROOF }}
github-token: ${{ github.token }}