-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
52 lines (47 loc) · 1.38 KB
/
.gitlab-ci.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
stages:
- build
- deploy
- prod-build
- prod-deploy
build site:
image: mcr.microsoft.com/dotnet/core/sdk:3.1
stage: build
script:
- dotnet build "./Alfred.Client/Alfred.Client.csproj" -c Release -o ./build
- dotnet publish "./Alfred.Client/Alfred.Client.csproj" -c Release -o ./publish
- echo "/* /index.html 200" > ./publish/wwwroot/_redirects
artifacts:
expire_in: 1 week
paths:
- ./publish
only:
- master@excel-mec/Alfred
deploy:
image: node:latest
stage: deploy
script:
- npm i -g netlify-cli
- npx netlify deploy --prod --dir ./publish/wwwroot --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN
only:
- master@excel-mec/Alfred
production build site:
image: mcr.microsoft.com/dotnet/core/sdk:3.1
stage: prod-build
script:
- dotnet build "./Alfred.Client/Alfred.Client.csproj" -c Release -o ./build
- dotnet publish "./Alfred.Client/Alfred.Client.csproj" -c Release -o ./publish-prod
- echo "/* /index.html 200" > ./publish-prod/wwwroot/_redirects
artifacts:
expire_in: 1 week
paths:
- ./publish-prod
only:
- prod@excel-mec/Alfred
production deploy:
image: node:latest
stage: prod-deploy
script:
- npm i -g netlify-cli
- npx netlify deploy --prod --dir ./publish-prod/wwwroot --site $PRODUCTION_NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN
only:
- prod@excel-mec/Alfred