Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/permaweb-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy to Arweave

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NEXT_PUBLIC_INTERCOM_ID: re9q5yti
NEXT_PUBLIC_PARA_API_KEY_PROD: ${{ github.ref == 'refs/heads/main' && secrets.NEXT_PUBLIC_PARA_API_KEY_PROD || '' }}
NEXT_PUBLIC_DRPC_KEY: AnmpasF2C0JBqeAEzxVO8aTteiMlrW4R75hpDonbV6cR

on:
push:
branches:
- main
jobs:
deploy:
if: ${{ always() }}
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Misc. Deps
run: sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++

- name: Install corepack
run: npm i -g corepack

- name: Install pnpm
run: npm i -g --force corepack && corepack enable pnpm

- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- run: pnpm install --frozen-lockfile

- name: Comparison of locales for missing keys
run: pnpm compare-locales

- name: Publish to Arweave
# deploy:arweave calls buildandexport
run: pnpm deploy:arweave
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
ARNS_NAME: ${{ secrets.ARNS_NAME }}
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -558,3 +558,16 @@ pnpm test:coverage
```bash
pnpm e2e
```

## Deploy to Arweave

Uses [permaweb-deploy](https://github.com/permaweb/permaweb-deploy) to deploy the app to Arweave and update the ArNS name to point to the new version of the app. Requires:

* ARNS_NAME environment variable to be set for what ArNS name to update
* DEPLOY_KEY environment variable to be set (base64 encoded version of Arweave wallet that is the owner of the ArNS name)

```bash
pnpm deploy:arweave
```

After deployment, will have to wait TTL seconds before updates appear on Arweave gateways (TTL configured on ArNS name).
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"subgraph:update": "ens-test-env subgraph --var NEXT_PUBLIC_DEPLOYMENT_ADDRESSES",
"knip": "knip",
"knip:fix": "knip --fix --allow-remove-files",
"hh": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only' hardhat"
"hh": "NODE_OPTIONS='--experimental-loader ts-node/esm/transpile-only' hardhat",
"deploy:arweave": "pnpm buildandexport && permaweb-deploy -d out --arns-name $ARNS_NAME"
},
"dependencies": {
"@ensdomains/address-encoder": "1.1.1",
Expand Down Expand Up @@ -164,6 +165,7 @@
"next-dev-https": "^0.1.2",
"next-router-mock": "^0.9.10",
"pako": "^2.1.0",
"permaweb-deploy": "^2.0.2",
"postcss-styled-syntax": "^0.7.1",
"prettier": "3.0.3",
"sitemap": "^7.1.1",
Expand Down
Loading
Loading