Skip to content

Merge branch 'dev' into fuzd #272

Merge branch 'dev' into fuzd

Merge branch 'dev' into fuzd #272

Workflow file for this run

name: build and deploy
on:
push:
pull_request:
# schedule:
# - cron: '0 9 * * *'
env:
ENS_NAME: ${{ vars.ENS_NAME }}
NFT_STORAGE_API_TOKEN: ${{ secrets.NFT_STORAGE_API_TOKEN }}
DWEBSERVICE_API_TOKEN: ${{ secrets.DWEBSERVICE_API_TOKEN }}
DWEBSERVICE_UUID: ${{ secrets.DWEBSERVICE_UUID }}
ETH_NODE_URI_sepolia: ${{ secrets.ETH_NODE_URI_sepolia }}
jobs:
build_and_deploy:
if: github.ref == 'refs/heads/public'
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [20]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: build
run: pnpm build
# - name: deploy web
# id: cid
# run: pnpm run --filter ./web deploy >> "$GITHUB_OUTPUT"
- name: install deployment tool
run: pnpm add -g [email protected]
- name: deploy to ipfs
id: cid
run: upload-to-ipfs web/build >> "$GITHUB_OUTPUT"
- name: echo CID
run: 'echo "Here is the URL: https://${{ steps.cid.outputs.CID }}.ipfs.dweb.link"'
- name: echo ENS_NAME
run: 'echo "name: $ENS_NAME"'
- name: IPNS update
if: ${{ ! env.DWEBSERVICE_UUID }}
run: 'curl -X "GET" "https://dwebservices.xyz/api/eth-names-ipns/$ENS_NAME/publish_by_name/${{ steps.cid.outputs.CID }}/" -H "accept: application/json" -H "Authorization: Bearer $DWEBSERVICE_API_TOKEN"'
- name: IPNS update
if: ${{ env.DWEBSERVICE_UUID }}
run: 'curl -X "GET" "https://dwebservices.xyz/api/eth-names-ipns/$DWEBSERVICE_UUID/publish/${{ steps.cid.outputs.CID }}/" -H "accept: application/json" -H "Authorization: Bearer $DWEBSERVICE_API_TOKEN"'