-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
72 lines (67 loc) · 1.58 KB
/
.gitlab-ci.yml
File metadata and controls
72 lines (67 loc) · 1.58 KB
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
67
68
69
70
71
72
stages:
- build
- deploy
variables:
VITE_NETWORK: any
# Build job (runs on all branches)
build:
stage: build
image: node:20
script:
- yarn install
- yarn build
artifacts:
paths:
- build/
expire_in: 1 hour
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
# GitLab Pages (for GitLab's built-in pages feature)
pages:
stage: deploy
image: node:20
script:
- mkdir -p public
- cp -r build/* public/
artifacts:
paths:
- public
only:
- main
# Deploy to Netlify beta (on develop branch)
deploy_beta:
stage: deploy
image: node:20
before_script:
- npm install -g netlify-cli
script:
- echo "Deploying to beta.explorer.accumulatenetwork.io (Netlify)..."
- netlify deploy --prod --site=${NETLIFY_BETA_SITE_ID} --auth=${NETLIFY_AUTH_TOKEN} --dir=build
- echo "✓ Beta deployment complete"
environment:
name: beta
url: https://beta.explorer.accumulatenetwork.io
only:
- develop
dependencies:
- build
# Deploy to Netlify production (on main branch, manual trigger)
deploy_production:
stage: deploy
image: node:20
before_script:
- npm install -g netlify-cli
script:
- echo "Deploying to explorer.accumulatenetwork.io (Netlify)..."
- netlify deploy --prod --site=${NETLIFY_PROD_SITE_ID} --auth=${NETLIFY_AUTH_TOKEN} --dir=build
- echo "✓ Production deployment complete"
environment:
name: production
url: https://explorer.accumulatenetwork.io
only:
- main
when: manual # Require manual trigger for production safety
dependencies:
- build