Skip to content

Commit

Permalink
Use NAIS CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
eriksson-daniel committed Aug 28, 2024
1 parent 3e16bb9 commit c945522
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/deploy-to-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,32 @@ jobs:
bun install
env:
NODE_AUTH_TOKEN: ${{ secrets.READER_TOKEN }}


- name: Test frontend
shell: bash
run: |
cd frontend
bun test
- name: Build frontend
shell: bash
env:
VERSION: ${{ github.sha }}
run: |
cd frontend
bun run build
- name: Test frontend
- name: Upload static files to CDN
uses: nais/deploy/actions/cdn-upload/v2@master
with:
team: klage
source: ./dist/assets
destination: '/assets/'
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}

- run: echo uploaded file ${{ steps.upload.outputs.uploaded }}
shell: bash
run: |
cd frontend
bun test

- name: Install server dependencies
shell: bash
Expand Down
1 change: 1 addition & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import tsconfigPaths from 'vite-tsconfig-paths'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [tsconfigPaths(), react()],
base: 'https://cdn.nav.no/team-klage/klang',
server: {
port: 8064,
proxy: {
Expand Down

0 comments on commit c945522

Please sign in to comment.