Skip to content

Commit

Permalink
test deploy til cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
sondrele committed Feb 1, 2024
1 parent 415de8f commit 5218d6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/mr-veileder-flate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,27 @@ jobs:
uses: ./.github/actions/setup-frontend
- name: Test
run: npx turbo run lint test:ci playwright --filter=mulighetsrommet-veileder-flate
env:
VITE_SANITY_PROJECT_ID: xegcworx
VITE_SANITY_DATASET: test

deploy-dev:
deploy-modia-dev:
name: Deploy (dev)
runs-on: ubuntu-latest
needs: [ci]
permissions:
id-token: "write" # Used to authenticate with Google Cloud
if: github.event_name == 'push' && github.ref_name == 'main' || github.event_name == 'workflow_dispatch'
steps:
- uses: actions/checkout@v4
- name: Setup frontend
uses: ./.github/actions/setup-frontend
- name: Build
run: npx turbo run build:modia --filter=mulighetsrommet-veileder-flate
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
env:
VITE_FARO_URL: https://telemetry.ekstern.dev.nav.no/collect
- name: Upload to NAV CDN
uses: navikt/frontend/actions/cdn-upload/v1@main
with:
workload_identity_provider: projects/932652929200/locations/global/workloadIdentityPools/github/providers/github-action
service_account: [email protected]
- name: Set up gcloud
uses: google-github-actions/setup-gcloud@v2
- name: Upload files to GCS
run: gsutil -m rsync -r /home/runner/work/mulighetsrommet/mulighetsrommet/frontend/mulighetsrommet-veileder-flate/dist gs://mulighetsrommet-veilederflate-dev
cdn-team-name: mulighetsrommet
source: dist
destination: /arbeidsmarkedstiltak-modia-dev/
no-cache-paths: arbeidsmarkedstiltak-modia-dev/build/asset-manifest.json

deploy-demo:
name: Deploy (demo)
Expand Down
2 changes: 1 addition & 1 deletion frontend/mulighetsrommet-veileder-flate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build": "cross-env VITE_MULIGHETSROMMET_API_BASE='http://localhost:8080' vite build",
"serve": "vite preview",
"build:demo": "cross-env APP=DEMO VITE_MULIGHETSROMMET_API_MOCK=true vite build",
"build:modia": "cross-env APP=MODIA VITE_MULIGHETSROMMET_API_BASE='/mulighetsrommet-api' VITE_FARO_URL=https://telemetry.nav.no/collect vite build",
"build:modia": "cross-env APP=MODIA VITE_MULIGHETSROMMET_API_BASE='/mulighetsrommet-api' vite build",
"build:nav": "cross-env APP=NAV VITE_MULIGHETSROMMET_API_BASE='/mulighetsrommet-api' VITE_FARO_URL=https://telemetry.ekstern.dev.nav.no/collect vite build",
"build:preview": "cross-env APP=PREVIEW VITE_MULIGHETSROMMET_API_BASE='/mulighetsrommet-api' VITE_FARO_URL=https://telemetry.ekstern.dev.nav.no/collect vite build",
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0 && tsc",
Expand Down

0 comments on commit 5218d6e

Please sign in to comment.