-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (50 loc) · 1.61 KB
/
swarm-upload.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Swarm Upload
on:
push:
branches:
- 'main'
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Build
env:
TINA_BRANCH: ${{ secrets.TINA_BRANCH }}
TINA_CLIENT_ID: ${{ secrets.TINA_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
run: |
npm ci
npm run build
- name: Upload to Swarm
uses: ethersphere/swarm-actions/upload-dir@v0
id: upload
with:
dir: ./out
index-document: index.html
postage-batch-id: ${{ secrets.PRIVATE_POSTAGE_BATCH_ID }}
bee-url: ${{ secrets.PRIVATE_BEE_URL }}
timeout: 300000
- name: Setup feed
uses: ethersphere/swarm-actions/write-feed@v0
id: feed
with:
reference: ${{ steps.upload.outputs.reference }}
topic: "swarm-homepage"
postage-batch-id: ${{ secrets.PRIVATE_POSTAGE_BATCH_ID }}
bee-url: ${{ secrets.PRIVATE_BEE_URL }}
signer: ${{ secrets.PRIVATE_SIGNER }}
- uses: ethersphere/swarm-actions/reference-to-cid@v0
id: cid
with:
reference: ${{ steps.feed.outputs.manifest }}
- run: |
echo 'Chunk Reference: ${{ steps.upload.outputs.reference }}'
echo 'Feed Reference: ${{ steps.feed.outputs.reference }}'
echo 'Feed Manifest: ${{ steps.feed.outputs.manifest }}'
echo 'Feed Bzz.link: https://${{ steps.cid.outputs.cid }}.bzz.link'