-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (49 loc) · 1.64 KB
/
deploy-dev-gcp.yaml
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
name: Deploy to dev
on:
workflow_dispatch:
push:
branches:
- master
env:
CI: true
TZ: Europe/Amsterdam
permissions:
contents: 'read'
id-token: 'write'
jobs:
deploy-dev:
name: Deploy application to dev
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test
- name: Build application
run: npm run build:dev
env:
PUBLIC_URL: https://veilarbvisittkortfs.intern.dev.nav.no
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCS_SA_KEY_DEV }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
- name: Upload files to GCS
run: gsutil -m rsync -r build gs://veilarbvisittkortfs-dev
- name: Upload to CDN
uses: nais/deploy/actions/cdn-upload/v2@master
with:
team: poao
source: ./build/
destination: /veilarbvisittkortfs-dev/
no_cache_paths: veilarbvisittkortfs-dev/build/asset-manifest.json
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}