File tree 2 files changed +57
-14
lines changed
2 files changed +57
-14
lines changed Original file line number Diff line number Diff line change 1
- name : Build and deploy XP archive (dev)
1
+ name : Build and deploy XP archive
2
2
on :
3
- workflow_dispatch :
4
- push :
5
- branches :
6
- - master
7
- paths :
8
- - package*.json
9
- - xp-archive/**/*
10
- - common/**/*
3
+ workflow_call :
4
+ inputs :
5
+ naisEnv :
6
+ required : true
7
+ type : string
8
+ VITE_APP_ORIGIN :
9
+ required : true
10
+ type : string
11
+ XP_ORIGIN :
12
+ required : true
13
+ type : string
14
+ HTML_RENDER_API :
15
+ required : true
16
+ type : string
17
+ secrets :
18
+ READER_TOKEN :
19
+ required : true
20
+ NAIS_WORKLOAD_IDENTITY_PROVIDER :
21
+ required : true
22
+ # on:
23
+ # workflow_dispatch:
24
+ # push:
25
+ # branches:
26
+ # - master
27
+ # paths:
28
+ # - package*.json
29
+ # - xp-archive/**/*
30
+ # - common/**/*
11
31
12
32
jobs :
13
33
build-and-deploy :
@@ -35,11 +55,11 @@ jobs:
35
55
run : |
36
56
cat > .env <<EOF
37
57
NODE_ENV=production
38
- VITE_APP_ORIGIN=https://cms-arkiv.ansatt.dev.nav.no
39
58
APP_PORT=3499
40
59
APP_BASEPATH=/xp
41
- XP_ORIGIN=https://www.dev.nav.no
42
- HTML_RENDER_API=http://nav-enonicxp-frontend-dev1/render-from-props
60
+ VITE_APP_ORIGIN={{ inputs.VITE_APP_ORIGIN }}
61
+ XP_ORIGIN={{ inputs.XP_ORIGIN }}
62
+ HTML_RENDER_API={{ inputs.HTML_RENDER_API }}
43
63
EOF
44
64
- name : Build application
45
65
run : npm run build
55
75
- name : Deploy application
56
76
uses : nais/deploy/actions/deploy@v2
57
77
env :
58
- CLUSTER : dev -gcp
78
+ CLUSTER : {{ inputs.naisEnv }} -gcp
59
79
RESOURCE : xp-archive/.nais/config.yml
60
80
VAR : image=${{ steps.docker-push.outputs.image }}
61
- VARS : xp-archive/.nais/vars/dev .yml
81
+ VARS : xp-archive/.nais/vars/{{ inputs.naisEnv }} .yml
Original file line number Diff line number Diff line change
1
+ name : Build and deploy XP archive to dev
2
+ on :
3
+ workflow_dispatch :
4
+ push :
5
+ branches :
6
+ - master
7
+ paths :
8
+ - package*.json
9
+ - xp-archive/**/*
10
+ - common/**/*
11
+
12
+ jobs :
13
+ build-and-deploy :
14
+ name : Build and deploy to dev
15
+ permissions :
16
+ contents : " read"
17
+ id-token : " write"
18
+ uses : ./.github/workflows/.xp-archive-deploy.yml
19
+ with :
20
+ naisEnv : dev
21
+ VITE_APP_ORIGIN : https://cms-arkiv.ansatt.dev.nav.no
22
+ XP_ORIGIN : https://www.dev.nav.no
23
+ HTML_RENDER_API : http://nav-enonicxp-frontend-dev1/render-from-props
You can’t perform that action at this time.
0 commit comments