-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds pinata and dnslink deploy action
- Loading branch information
Showing
4 changed files
with
68 additions
and
44 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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/" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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/[email protected] | ||
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: | | ||
<br /> | ||
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/ |