add use client flag #73
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
--- | |
name: Deploy | |
on: | |
push: | |
branches: | |
- development | |
paths: | |
- 'web/**' | |
- '.github/workflows/deploy.yml' | |
jobs: | |
deploy-to-ipfs: | |
runs-on: ubuntu-latest | |
environment: mainnet | |
env: | |
NEXT_PUBLIC_CONTRACT_ADDRESS: ${{ vars.NEXT_PUBLIC_CONTRACT_ADDRESS }} | |
NEXT_PUBLIC_THIRDWEB_ID: ${{ vars.NEXT_PUBLIC_THIRDWEB_ID }} | |
NEXT_PUBLIC_NET: ${{ vars.NEXT_PUBLIC_NET }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
lfs: "true" | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 8 | |
run_install: | | |
- recursive: true | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.pnpm | |
${{ github.workspace }}/.next/cache | |
# Generate a new cache whenever packages or source files change. | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }} | |
# If source files changed but packages didn't, rebuild from a prior cache. | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.15.0 | |
- run: | | |
cd web | |
pnpm build | |
- name: Publish to Cloudflare Pages | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }} | |
# update | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
# update | |
projectName: ${{ secrets.CLOUDFLARE_PROJECT_NAME }} | |
directory: out | |
# to enable Github Deployments | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
branch: main | |
workingDirectory: web |