chore: bump address book (#147) #247
This file contains hidden or 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: Deploy to ipfs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| push: | |
| branches: ['main'] | |
| env: | |
| NEXT_PUBLIC_DEPLOY_FOR_IPFS: true | |
| jobs: | |
| ipfs_deploy: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: 'IPFS' | |
| url: https://${{ steps.pinata.outputs.hash }}.ipfs.dweb.link/ | |
| outputs: | |
| pinata_hash: '${{ steps.pinata.outputs.hash }}' | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Packages install | |
| shell: sh | |
| run: yarn --frozen-lockfile --prefer-offline | |
| - name: Build next js app | |
| run: yarn build | |
| - name: Deploy to ipfs | |
| id: pinata | |
| uses: aave/pinata-action@a3409e26f4cb859a2d9984109317caac53db5f68 | |
| with: | |
| PINATA_API_KEY: ${{ secrets.PINATA_API_KEY }} | |
| PINATA_SECRET_KEY: ${{ secrets.PINATA_SECRET_KEY }} | |
| PIN_ALIAS: 'app-aave-governance-v3-${{ github.head_ref || github.ref }}' | |
| BUILD_LOCATION: './out' | |
| CID_VERSION: 1 | |
| - name: Amend ipfs link to release | |
| uses: actions/github-script@v6 | |
| if: contains(github.event.head_commit.message, 'chore(main):') | |
| with: | |
| retries: 3 | |
| script: | | |
| const { data } = await github.rest.repos.getLatestRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| }) | |
| github.rest.repos.updateRelease({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| release_id: data.id, | |
| body: data.body + `\n <hr> \n Ipfs deployment: ` + `${{steps.pinata.outputs.uri}}`, | |
| }) |