This project automatically deploys to IPFS via Pinata when you create a new release or push a version tag.
- Go to Pinata.cloud and create an account
- Navigate to API Keys in your Pinata dashboard
- Click New Key
- Give it a name (e.g., "envPledge GitHub Actions")
- Enable the following permissions:
pinFileToIPFSpinJSONToIPFSunpin
- Copy the API Key and API Secret
- Go to your GitHub repository
- Navigate to Settings → Secrets and variables → Actions
- Click New repository secret
- Add three secrets:
- Name:
PINATA_API_KEY- Value: Your Pinata API Key
- Name:
PINATA_SECRET_KEY- Value: Your Pinata API Secret
- Name:
WALLETCONNECT_PROJECT_ID- Value: Your WalletConnect Project ID (get one free at WalletConnect Cloud)
- Name:
- Go to your repository on GitHub
- Click Releases → Create a new release
- Create a new tag (e.g.,
v0.2.0) - Fill in release title and description
- Click Publish release
The GitHub Action will automatically:
- Build the static site
- Deploy to IPFS via Pinata
- Output the IPFS CID and gateway URL in the Actions logs
git tag v0.2.0
git push origin v0.2.0- Go to your repository on GitHub
- Click Actions → Build and Deploy to IPFS
- Click Run workflow dropdown
- Select the branch to deploy
- Click Run workflow
This is useful for testing deployments or deploying without creating a release/tag.
After deployment, you can access your app via:
- Pinata Gateway:
https://gateway.pinata.cloud/ipfs/<CID> - IPFS Gateway:
https://ipfs.io/ipfs/<CID> - Cloudflare IPFS Gateway:
https://cloudflare-ipfs.com/ipfs/<CID>
The CID (Content Identifier) will be displayed in the GitHub Actions logs.
- Workflow file:
.github/workflows/deploy-ipfs.yml - Triggers:
- Release published
- Tag push (v*)
- Manual workflow dispatch
- Build command:
pnpm run build - Output directory:
./out - Pin alias format:
envpledge-<version>
- Build fails: Check that
pnpm run buildworks locally - Pinata authentication fails: Verify your API keys are correct in GitHub Secrets
- Deployment succeeds but CID not displayed: Check the Actions log output for the CID
- WalletConnect error in deployed app: Ensure
WALLETCONNECT_PROJECT_IDsecret is set in GitHub Secrets