-
Notifications
You must be signed in to change notification settings - Fork 9
66 lines (55 loc) · 1.82 KB
/
deploy-preview.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
65
66
name: "Preview Auth Server"
on:
pull_request:
paths:
- "packages/auth-server/**"
- "packages/sdk/**"
workflow_dispatch:
env:
HUSKY: 0
CI: true
jobs:
build_and_preview:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
outputs:
output_urls: "${{ steps.preview_deploy.outputs.urls }}"
steps:
- uses: actions/checkout@v4 # v4
with:
submodules: recursive
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.11.0
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: lts/Iron
cache: 'pnpm'
# SDK depends on contracts
- name: Install contract dependencies
run: pnpm install -r --frozen-lockfile
working-directory: packages/contracts
- name: Build contracts
run: pnpm run build
working-directory: packages/contracts
# Local node to have target for deploy
- name: Era Test Node Action
uses: dutterbutter/[email protected]
- name: Deploy contracts
run: pnpm run deploy --file ../auth-server/stores/local-node.json
working-directory: packages/contracts
- name: Install dependencies
run: pnpm install -r --frozen-lockfile
- name: Build Auth Server
env:
NUXT_PUBLIC_DEFAULT_CHAIN_ID: 300
run: pnpm nx build auth-server
- name: Deploy preview
uses: matter-labs/action-hosting-deploy@main
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_AUTH_SERVER_STAGING }}"
projectId: zksync-auth-server-staging
target: zksync-auth-server-staging