feat(frontend): add printable campaign completion certificate PDF (#817) #563
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: Frontend CI | ||
|
Check failure on line 1 in .github/workflows/frontend.yml
|
||
| on: [push, pull_request] | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v3 | ||
| with: | ||
| version: 9 | ||
| - name: Install dependencies | ||
| run: pnpm install --no-frozen-lockfile | ||
| - name: Configure frontend environment | ||
| run: | | ||
| node -e " | ||
| const fs = require('fs'); | ||
| const d = JSON.parse(fs.readFileSync('deployments/testnet.json', 'utf8')); | ||
| const env = [ | ||
| 'NEXT_PUBLIC_PAYMENT_STREAM_CONTRACT_ID=' + d.payment_stream, | ||
| 'NEXT_PUBLIC_DISTRIBUTOR_CONTRACT_ID=' + d.distributor, | ||
| ].join('\n'); | ||
| fs.writeFileSync('apps/web/.env.local', env); | ||
| " | ||
| - name: Lint frontend | ||
| run: pnpm lint | ||
| name: Frontend CI | ||
| on: [push, pull_request] | ||
| jobs: | ||
| test: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Debug - Check files | ||
| run: | | ||
| echo "=== Current directory ===" | ||
| pwd | ||
| echo "" | ||
| echo "=== List files ===" | ||
| ls -la | ||
| echo "" | ||
| echo "=== Check package.json ===" | ||
| cat package.json || echo "No package.json found" | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v3 | ||
| with: | ||
| version: 9 | ||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
| - name: Configure frontend environment | ||
| run: | | ||
| node -e " | ||
| const fs = require('fs'); | ||
| const d = JSON.parse(fs.readFileSync('deployments/testnet.json', 'utf8')); | ||
| const env = [ | ||
| 'NEXT_PUBLIC_PAYMENT_STREAM_CONTRACT_ID=' + d.payment_stream, | ||
| 'NEXT_PUBLIC_DISTRIBUTOR_CONTRACT_ID=' + d.distributor, | ||
| ].join('\n'); | ||
| fs.writeFileSync('apps/web/.env.local', env); | ||
| " | ||
| - name: Lint frontend | ||
| run: pnpm lint | ||
| - name: Build frontend | ||
| run: pnpm build | ||