-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (62 loc) · 2.06 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Code Quality
on:
push:
pull_request:
jobs:
code-quality:
timeout-minutes: 60
runs-on: ubuntu-24.04
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_REMOTE_ONLY: true
DIRECTUS_API_KEY: ${{ secrets.DIRECTUS_API_KEY }}
PUBLIC_WALLET_CONNECT_PROJECT_ID: ${{ secrets.PUBLIC_WALLET_CONNECT_PROJECT_ID }}
OPEN_SEA_API_KEY: ${{ secrets.OPEN_SEA_API_KEY }}
ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }}
NFTSCAN_API_KEY: ${{ secrets.NFTSCAN_API_KEY }}
VERCEL_URL: 'empty'
PUBLIC_WEB3INBOX_ALL_APPS: false
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: pnpm i
- name: Lint
run: pnpm lint
- name: Test
run: pnpm test
deploy-workers:
needs: code-quality
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Deploy Workers
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4
with:
node-version: '20'
cache: 'pnpm'
- name: Deploy @sni/api [PRODUCTION]
uses: cloudflare/wrangler-action@9681c2997648301493e78cacbfb790a9f19c833f # v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: './apps/api'
packageManager: 'pnpm'
environment: 'production'
- name: Deploy @sni/api [STAGING]
uses: cloudflare/wrangler-action@9681c2997648301493e78cacbfb790a9f19c833f # v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
workingDirectory: './apps/api'
packageManager: 'pnpm'
environment: 'staging'