📝 Update readme #13
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: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
env: | |
CI: true | |
ACTIONS_RUNNER_DEBUG: true | |
jobs: | |
deploy: | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node-version: ['lts/*'] | |
pnpm-version: ['latest'] | |
os: ['ubuntu-latest'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: 🔑 Checkout | |
uses: actions/checkout@v3 | |
- name: 🥐 Setup pnpm [${{ matrix.pnpm-version }}] | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: ${{ matrix.pnpm-version }} | |
- name: ⎔ Setup Node.js [${{ matrix.node-version }}] | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: '📦 Install Dependencies' | |
run: | | |
pnpm install --frozen-lockfile | |
pnpm add --global wrangler@beta | |
- name: '🧹 Lint' | |
run: pnpm lint | |
- name: '🧹 Format' | |
run: pnpm format | |
- name: '🧪 Typecheck' | |
run: pnpm typecheck | |
- name: '🔧 Build' | |
run: pnpm build | |
- name: '🔸 Cloudflare Workers - Deploy 🚀' | |
working-directory: ./apps/api | |
env: | |
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
run: | | |
wrangler deploy ./src/index.ts --experimental-json-config | |
echo ${{ secrets.SENTRY_DSN }} | wrangler --experimental-json-config secret put SENTRY_DSN | |
echo ${{ secrets.INFURA_KEY }} | wrangler --experimental-json-config secret put INFURA_KEY | |
echo ${{ secrets.ANKR_API_KEY }} | wrangler --experimental-json-config secret put ANKR_API_KEY | |
echo ${{ secrets.LLAMANODES_API_KEY }} | wrangler --experimental-json-config secret put LLAMANODES_API_KEY | |
echo ${{ secrets.CHAINNODES_API_KEY }} | wrangler --experimental-json-config secret put CHAINNODES_API_KEY |