-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (42 loc) · 1.44 KB
/
main.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
name: Build and deploy main
on:
push:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # ratchet:actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # ratchet:actions/setup-node@v3
with:
node-version: '18.x'
- name: Cache dependencies
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # ratchet:actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Upload to CDN
id: upload
uses: navikt/frontend/actions/spa-deploy/v1@3a87f63d3d7a0903d8cce798453d3567d1b0020a # ratchet:navikt/frontend/actions/spa-deploy/v1@main
with:
team-name: security-champion-admin
app-name: playbook
environment: prod
source: build
ingress: https://sikkerhet.nav.no
nais-deploy-apikey: ${{ secrets.NAIS_DEPLOY_APIKEY }}