Skip to content

Upload to Swarm

Upload to Swarm #36

Workflow file for this run

name: Upload to Swarm
on:
workflow_dispatch:
schedule:
- cron: '15 5 * * *'
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: Install HTTrack
run: sudo apt-get update && sudo apt-get install -y httrack
- name: Build Static Export
run: |
npm ci
npm run clone
npm run export
- name: Upload to Swarm
uses: ethersphere/swarm-actions/upload-dir@v1
id: upload
with:
dir: ./output/devcon-local
index-document: index.html
postage-batch-id: ${{ secrets.PRIVATE_POSTAGE_BATCH_ID }}
bee-url: ${{ secrets.PRIVATE_BEE_URL }}
- name: Setup feed
uses: ethersphere/swarm-actions/write-feed@v1
id: feed
with:
reference: ${{ steps.upload.outputs.reference }}
topic: "devcon-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@v1
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'