Skip to content

Merge branch 'main' into fix/FET-1481 #3923

Merge branch 'main' into fix/FET-1481

Merge branch 'main' into fix/FET-1481 #3923

name: Cloudflare Pages
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
NEXT_PUBLIC_INTERCOM_ID: re9q5yti
on: [push]
jobs:
yalc_check:
runs-on: ubuntu-latest
outputs:
can_deploy: ${{ steps.has_yalc.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Yalc
run: npm i -g yalc
- id: has_yalc
run: |
! yalc check | grep -qe .
deploy:
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [yalc_check]
permissions:
contents: read
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Misc. Deps
run: sudo apt-get install -y libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
- name: Check Yalc
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' }}
run: if [ ${{ needs.yalc_check.outputs.can_deploy }} != true ]; then exit 1; else exit 0; fi
- name: Install pnpm
run: corepack enable pnpm
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
- run: pnpm install --frozen-lockfile
- name: Comparison of locales for missing keys
run: pnpm compare-locales
- name: Build and Export
if: ${{ github.ref == 'refs/heads/main' }}
run: pnpm build && pnpm export
- name: Build and Export with Profiler
if: ${{ github.ref != 'refs/heads/main' }}
run: pnpm build:preview && pnpm export
- name: Generate sitemap
if: ${{ github.ref == 'refs/heads/main' }}
run: |
mkdir -p ./out/sitemaps
pnpm generate:sitemaps
- name: Publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ens-app-v3
directory: out
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: '3'
- name: Submit sitemap
if: ${{ github.ref == 'refs/heads/main' }}
run: curl https://www.google.com/ping\?sitemap=https://app.ens.domains/sitemap.xml