Deploy to IPFS #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@9fd676a19091d4595eefd76e4bd31c97133911f1 # v4.2.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: 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 | |
| - name: Upload to IPFS | |
| id: upload | |
| run: | | |
| python3 scripts/deploy-ipfs.py out/ | |
| env: | |
| ALEPH_PRIVATE_KEY: ${{ secrets.ALEPH_PRIVATE_KEY }} | |
| ALEPH_OWNER_ADDRESS: "0xB136a85c95a0ea573793AB9739c7dF8682B87fCa" | |
| - name: Write job summary | |
| run: | | |
| cat >> "$GITHUB_STEP_SUMMARY" <<EOF | |
| ## Deployed to IPFS | |
| | | | | |
| |---|---| | |
| | **CID (v0)** | \`${{ steps.upload.outputs.cid_v0 }}\` | | |
| | **CID (v1)** | \`${{ steps.upload.outputs.cid_v1 }}\` | | |
| | **Gateway** | https://${{ steps.upload.outputs.cid_v1 }}.ipfs.aleph.sh/ | | |
| EOF |