-
Notifications
You must be signed in to change notification settings - Fork 2
55 lines (48 loc) · 1.59 KB
/
deploy.yml
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: "build-test"
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
env:
REACT_APP_BEE_API: https://api.gateway.ethswarm.org
REACT_APP_BEE_DEBUG_API: https://api.gateway.ethswarm.org
REACT_APP_BEE_GATEWAY_MODE: true
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "14"
- run: yarn
- run: yarn build
- uses: ethersphere/swarm-actions/upload-dir@v0
id: upload
with:
dir: ./build
index-document: index.html
postage-batch-id: ${{ secrets.POSTAGE_BATCH_ID }}
bee-url: ${{ secrets.BEE_URL }}
timeout: 300000
headers: |
authorization: ${{ secrets.API_TOKEN }}
- uses: ethersphere/swarm-actions/write-feed@v0
id: feed
with:
reference: ${{ steps.upload.outputs.reference }}
topic: "swapchat2-main"
postage-batch-id: ${{ secrets.POSTAGE_BATCH_ID }}
bee-url: ${{ secrets.BEE_URL }}
signer: ${{ secrets.SIGNER }}
headers: |
authorization: ${{ secrets.API_TOKEN }}
- 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'