Merge pull request #1291 from decent-dao/feature/snapshot-proposal-en… #478
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: Release IPFS Dev | |
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
create_release: | |
name: Create IPFS Release | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up node | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: '.nvmrc' | |
- name: Install and Build | |
run: | | |
npm install | |
npm run graphql:build | |
npm run build:ipfs | |
env: | |
NEXT_PUBLIC_INFURA_API_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_API_KEY }} | |
NEXT_PUBLIC_ALCHEMY_API_KEY: ${{ secrets.NEXT_PUBLIC_ALCHEMY_API_KEY }} | |
NEXT_PUBLIC_SITE_URL: ${{ secrets.NEXT_PUBLIC_SITE_URL }} | |
NEXT_PUBLIC_ETHERSCAN_API_KEY: ${{ secrets.NEXT_PUBLIC_ETHERSCAN_API_KEY }} | |
NEXT_PUBLIC_INFURA_IPFS_API_KEY: ${{ secrets.NEXT_PUBLIC_INFURA_IPFS_API_KEY }} | |
NEXT_PUBLIC_INFURA_IPFS_API_SECRET: ${{ secrets.NEXT_PUBLIC_INFURA_IPFS_API_SECRET }} | |
- name: IPFS Pinata deploy GitHub action | |
uses: decent-dao/[email protected] | |
id: upload | |
with: | |
pin-name: 'app.dev.fractalframework.xyz' | |
path: './out/' | |
pinata-api-key: ${{ secrets.PINATA_API_KEY }} | |
pinata-secret-api-key: ${{ secrets.PINATA_API_SECRET_KEY }} | |
- name: Convert CIDv0 to CIDv1 | |
id: convert_cidv0 | |
uses: decent-dao/[email protected] | |
with: | |
cidv0: ${{ steps.upload.outputs.hash }} | |
- name: Update DNS with new IPFS hash | |
uses: textileio/cloudflare-update-dnslink@v2 | |
with: | |
cid: ${{ steps.convert_cidv0.outputs.cidv1 }} | |
env: | |
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} | |
RECORD_DOMAIN: 'fractalframework.xyz' | |
RECORD_NAME: '_dnslink.app.dev' | |
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} |