Skip to content

Commit 4bc208b

Browse files
committed
lagt til storybook workflow
1 parent 2f3041b commit 4bc208b

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
name: Bygg og deploy storybook
3+
4+
on:
5+
push:
6+
branches:
7+
- 'master'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: read
14+
id-token: write
15+
name: Bygg og deploy
16+
runs-on: ubuntu-latest
17+
outputs:
18+
image: ${{ steps.docker-build-push.outputs.image }}
19+
steps:
20+
- name: Sjekk ut kode
21+
uses: actions/checkout@v4
22+
- name: Konfigurer Node
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: 20
26+
- name: Frontend npm install
27+
run: npm ci
28+
- name: Frontend - test, lint og build
29+
run: npm run build-storybook
30+
- name: Push docker image to GAR
31+
uses: nais/docker-build-push@v0
32+
id: docker-build-push
33+
with:
34+
team: arbeidsgiver
35+
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
36+
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
37+
dockerfile: StorybookDockerfile
38+
39+
deploy-dev:
40+
name: Deploy til dev-gcp
41+
runs-on: ubuntu-latest
42+
needs: build
43+
permissions:
44+
contents: read
45+
id-token: write
46+
steps:
47+
- name: Sjekk ut kode
48+
uses: actions/checkout@v4
49+
- name: Deploy til dev-gcp
50+
uses: nais/deploy/actions/deploy@v2
51+
env:
52+
CLUSTER: dev-gcp
53+
RESOURCE: .nais/nais-dev-gcp-storybook.yml
54+
VAR: image=${{ needs.build.outputs.image }}

0 commit comments

Comments
 (0)