Skip to content

Commit

Permalink
Merge pull request #1652 from navikt/TAG-2118_cdn
Browse files Browse the repository at this point in the history
bruk cdn til css og js
  • Loading branch information
kenglxn authored Aug 28, 2023
2 parents 9488abd + d6de23a commit 7645d75
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/bygg-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ jobs:
bygg:
name: Bygg branch
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
packages: 'write'
steps:
- name: Sjekk ut kode
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
node-version: '16.14.2'
node-version: '18'
registry-url: https://npm.pkg.github.com/
cache: 'npm'

Expand All @@ -32,6 +36,8 @@ jobs:
- run: npm run lint

- run: npm run build
env:
PUBLIC_URL: https://cdn.nav.no/fager/min-side-arbeidsgiver/build/

- uses: docker/login-action@v1
with:
Expand All @@ -44,3 +50,10 @@ jobs:
docker build --tag $IMAGE_BASE:$GITHUB_SHA .
echo ${{ secrets.GITHUB_TOKEN }} | docker login docker.pkg.github.com -u $GITHUB_REPOSITORY --password-stdin
docker push $IMAGE_BASE:$GITHUB_SHA
- id: upload
uses: navikt/frontend/actions/cdn-upload/v1@main
with:
cdn-team-name: fager
source: ./build/
destination: '/min-side-arbeidsgiver'
17 changes: 15 additions & 2 deletions .github/workflows/bygg-og-deploy-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,17 @@ jobs:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request'
permissions:
contents: 'read'
id-token: 'write'
packages: 'write'
steps:
- name: Sjekk ut kode
uses: actions/checkout@v2
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '16.14.2'
node-version: '18'
registry-url: https://npm.pkg.github.com/
cache: 'npm'

Expand All @@ -53,6 +57,8 @@ jobs:
- run: npm run lint

- run: npm run build
env:
PUBLIC_URL: https://cdn.nav.no/fager/min-side-arbeidsgiver/build/

- uses: docker/login-action@v1
with:
Expand All @@ -66,6 +72,13 @@ jobs:
echo $GITHUB_TOKEN | docker login docker.pkg.github.com -u $GITHUB_REPOSITORY --password-stdin
docker push $IMAGE
- id: upload
uses: navikt/frontend/actions/cdn-upload/v1@main
with:
cdn-team-name: fager
source: ./build/
destination: '/min-side-arbeidsgiver'

- name: Lag sentry release
continue-on-error: true
env:
Expand Down

0 comments on commit 7645d75

Please sign in to comment.