Skip to content

Deploy to IPFS

Deploy to IPFS #40

Workflow file for this run

name: Deploy to IPFS
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # v4.4.0
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
env:
NEXT_PUBLIC_API_URL: https://rust-scheduler.aleph.im
- name: Extract version
id: version
run: |
VERSION=$(grep -E '^export const CURRENT_VERSION' src/changelog.ts | sed -E 's/.*"([^"]+)".*/\1/')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.12"
- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y libsecp256k1-dev
- name: Install aleph-client
run: pip install "aleph-client>=1.0.0" "requests>=2.32.0,<3.0"
- name: Upload to IPFS
id: upload
run: |
python3 scripts/deploy-ipfs.py out/
env:
# Stream logs live in CI — Python block-buffers stdout by default,
# which makes mid-run hangs opaque (prints flush only on exit).
PYTHONUNBUFFERED: "1"
ALEPH_PRIVATE_KEY: ${{ secrets.ALEPH_PRIVATE_KEY }}
ALEPH_OWNER_ADDRESS: "0xB136a85c95a0ea573793AB9739c7dF8682B87fCa"
ALEPH_WEBSITE_NAME: "scheduler-dashboard"
ALEPH_DOMAIN: ${{ vars.ALEPH_DOMAIN }}
- name: Write job summary
run: |
cat >> "$GITHUB_STEP_SUMMARY" <<EOF
## Deployed to IPFS
| | |
|---|---|
| **Version** | \`v${{ steps.version.outputs.version }}\` |
| **CID** | \`${{ steps.upload.outputs.cid }}\` |
| **Gateway** | https://${{ steps.upload.outputs.cid }}.ipfs.aleph.sh/ |
EOF