Deploy to IPFS as part of the CI pipeline #927
Workflow file for this run
This file contains 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: Web Deploy to dev/staging | |
on: | |
pull_request: | |
push: | |
branches: | |
- dev | |
- main | |
paths: | |
- apps/web/** | |
- packages/** | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
id-token: write | |
name: Deploy to dev/staging | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/yarn | |
- uses: ./.github/actions/build | |
with: | |
secrets: ${{ toJSON(secrets) }} | |
# if: startsWith(github.ref, 'refs/heads/main') | |
# Script to upload to IPFS | |
- name: Upload to IPFS | |
uses: aquiladev/ipfs-action@v0.2.1 | |
with: | |
path: apps/web | |
service: pinata | |
pinataKey: ${{ secrets.PINATA_API_KEY }} | |
pinataSecret: ${{ secrets.PINATA_SECRET_KEY }} | |
- name: Output IPFS CID | |
run: | | |
echo "Deployed to IPFS: ${{ steps.upload.outputs.Hash }}" | |
echo "Gateway link: https://ipfs.io/ipfs/${{ steps.upload.outputs.Hash }}" |