diff --git a/.fleek.dev.json b/.fleek.dev.json deleted file mode 100644 index 776606df..00000000 --- a/.fleek.dev.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "site": { - "id": "0b51816f-6975-41e0-be44-1cf8f852a1c3", - "team": "ae342e76-2b64-47fd-80f2-cf0274e932f7", - "platform": "ipfs", - "source": "ipfs", - "name": "zodiac-safe-app-dev" - }, - "build": { - "baseDir": "", - "publicDir": "./build/", - "rootDir": "" - } -} \ No newline at end of file diff --git a/.fleek.prod.json b/.fleek.prod.json deleted file mode 100644 index 43eae95c..00000000 --- a/.fleek.prod.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "site": { - "id": "65b38def-e0f9-4838-82e7-50130df06ef8", - "team": "ae342e76-2b64-47fd-80f2-cf0274e932f7", - "platform": "ipfs", - "source": "ipfs", - "name": "zodiac-safe-app-prod" - }, - "build": { - "baseDir": "", - "publicDir": "./build/", - "rootDir": "" - } -} \ No newline at end of file diff --git a/.github/workflows/dev-cd.yaml b/.github/workflows/dev-cd.yaml index 8d55cae3..5ef2c72f 100644 --- a/.github/workflows/dev-cd.yaml +++ b/.github/workflows/dev-cd.yaml @@ -19,12 +19,31 @@ jobs: - run: npm install -g yarn - run: yarn install --frozen-lockfile - run: yarn build - - name: Setup fleek config file - run: cp ./.fleek.dev.json ./.fleek.json - - name: Deploy site - id: deploy - uses: fleekhq/action-deploy@v1 + + - name: Pin to IPFS + id: upload + uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d + with: + pin-name: Zodiac Safe App - Latest — ${ GITHUB_SHA } + path: './build' + 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: uniswap/convert-cidv0-cidv1@v1.0.0 with: - apiKey: ${{ secrets.FLEEK_API_KEY }} - - name: Get the output url - run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}" + cidv0: ${{ steps.upload.outputs.hash }} + + - name: Update DNS with new IPFS hash + env: + CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} + RECORD_DOMAIN: 'gnosisguild.org' + RECORD_NAME: '_dnslink.zodiac.dev' + CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} + uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848 + with: + cid: ${{ steps.upload.outputs.hash }} + + - name: Get IPFS url + run: echo "IPFS gateways — https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/ or https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/" diff --git a/.github/workflows/prod-release-deploy.yaml b/.github/workflows/prod-release-deploy.yaml index 3cfa3867..1535dbe6 100644 --- a/.github/workflows/prod-release-deploy.yaml +++ b/.github/workflows/prod-release-deploy.yaml @@ -19,12 +19,45 @@ jobs: - run: npm install -g yarn - run: yarn install --frozen-lockfile - run: yarn build - - name: Setup fleek config file - run: cp ./.fleek.prod.json ./.fleek.json - - name: Deploy site - id: deploy - uses: fleekhq/action-deploy@v1 + + - name: Pin to IPFS + id: upload + uses: anantaramdas/ipfs-pinata-deploy-action@39bbda1ce1fe24c69c6f57861b8038278d53688d + with: + pin-name: Zodiac Safe App - Prod — ${ GITHUB_SHA } + path: './build' + 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: uniswap/convert-cidv0-cidv1@v1.0.0 + with: + cidv0: ${{ steps.upload.outputs.hash }} + + - name: Update DNS with new IPFS hash + env: + CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} + RECORD_DOMAIN: 'gnosisguild.org' + RECORD_NAME: '_dnslink.zodiac' + CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} + uses: textileio/cloudflare-update-dnslink@0fe7b7a1ffc865db3a4da9773f0f987447ad5848 + with: + cid: ${{ steps.upload.outputs.hash }} + + - name: update release + id: update_release + uses: tubone24/update_release@v1.3.1 + env: + GITHUB_TOKEN: ${{ github.token }} with: - apiKey: ${{ secrets.FLEEK_API_KEY }} - - name: Get the output url - run: echo "Deploy url is ${{ steps.deploy.outputs.deployUrl }}" + is_append_body: true + body: | +
+ IPFS hash of the deployment: + - CIDv0: `${{ steps.upload.outputs.hash }}` + - CIDv1: `${{ steps.convert_cidv0.outputs.cidv1 }}` + + IPFS gateways: + - https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.dweb.link/ + - https://${{ steps.convert_cidv0.outputs.cidv1 }}.ipfs.cf-ipfs.com/ \ No newline at end of file