Skip to content

Commit 883f8fc

Browse files
authored
Merge pull request #821 from filecoin-project/feat/filecoin-pin-ci
feat: CI uploads to Filecoin Onchain Cloud
2 parents 8ecfbc8 + 7c48cd0 commit 883f8fc

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Upload site to Filecoin
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
actions: read
13+
pull-requests: write
14+
15+
jobs:
16+
upload:
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.FILECOIN_PIN_GH_TOKEN }}
19+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false }}
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 20.x
29+
30+
- name: Install dependencies
31+
run: npm ci
32+
33+
- name: Build site
34+
run: npm run build
35+
36+
- name: Upload to Filecoin
37+
uses: sgtpooki/filecoin-upload-action@main
38+
with:
39+
privateKey: ${{ secrets.FILECOIN_WALLET_KEY }}
40+
path: public
41+
minDays: 30
42+
maxTopUp: ${{ github.event_name == 'pull_request' && '0.0001' || '0.01' }}
43+
providerAddress: "0xa3971A7234a3379A1813d9867B531e7EeB20ae07"

0 commit comments

Comments
 (0)