🐛 Timeline zoomes nå kun på load #749
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy | |
on: | |
push: | |
branches: | |
- master | |
- next/** | |
env: | |
APP: speil | |
TEAM: tbd | |
jobs: | |
test-and-lint: | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-npm-deps | |
with: | |
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- run: npm run test | |
- run: npm run lint | |
build-dev: | |
if: "!startsWith(github.ref, 'refs/heads/next/')" | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-npm-deps | |
name: Installer deps | |
with: | |
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- run: cp envs/.env.dev .env.production | |
- run: npm run build | |
- uses: ./.github/actions/cdn-n-image | |
name: Last opp til CDN og bygg docker image | |
id: cdn-n-image | |
with: | |
app: ${{ env.APP }} | |
team: ${{ env.TEAM }} | |
env: dev | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
outputs: | |
image: ${{ steps.cdn-n-image.outputs.image }} | |
build-experimental-dev: | |
if: startsWith(github.ref, 'refs/heads/next/') | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-npm-deps | |
name: Installer deps | |
with: | |
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- run: cp envs/.env.dev .env.production | |
- run: npm run build | |
- uses: ./.github/actions/cdn-n-image | |
name: Last opp til CDN og bygg docker image | |
id: cdn-n-image | |
with: | |
app: ${{ env.APP }} | |
team: ${{ env.TEAM }} | |
env: next | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
outputs: | |
image: ${{ steps.cdn-n-image.outputs.image }} | |
build-production: | |
if: github.ref == 'refs/heads/master' | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/setup-npm-deps | |
name: Installer deps | |
with: | |
NPM_AUTH_TOKEN: ${{ secrets.READER_TOKEN }} | |
- run: cp envs/.env.production .env.production | |
- run: npm run build | |
- uses: ./.github/actions/cdn-n-image | |
name: Last opp til CDN og bygg docker image | |
id: cdn-n-image | |
with: | |
app: ${{ env.APP }} | |
team: ${{ env.TEAM }} | |
env: prod | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
outputs: | |
image: ${{ steps.cdn-n-image.outputs.image }} | |
deploy-dev: | |
name: Deploy to dev | |
needs: [build-dev, test-and-lint] | |
runs-on: ubuntu-latest | |
environment: | |
name: dev | |
url: https://speil.ansatt.dev.nav.no | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-gcp | |
RESOURCE: deploy/dev.yml,deploy/alerts-dev.yml | |
VAR: 'image=${{ needs.build-dev.outputs.image }},team=${{env.TEAM}},app=${{env.APP}}' | |
deploy-experimental-dev: | |
name: Deploy to experimental dev | |
needs: [build-experimental-dev, test-and-lint] | |
runs-on: ubuntu-latest | |
environment: | |
name: dev-next | |
url: https://speil-next.intern.dev.nav.no | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: dev-gcp | |
RESOURCE: deploy/next.yml | |
VAR: 'image=${{ needs.build-experimental-dev.outputs.image }},team=${{env.TEAM}},app=${{env.APP}}-next' | |
deploy-prod: | |
name: Deploy to prod | |
needs: [build-production, test-and-lint] | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' | |
environment: | |
name: production | |
url: https://speil.intern.nav.no | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: nais/deploy/actions/deploy@v2 | |
env: | |
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }} | |
CLUSTER: prod-gcp | |
RESOURCE: deploy/prod.yml,deploy/alerts-prod.yml | |
VAR: 'image=${{ needs.build-production.outputs.image }},team=${{env.TEAM}},app=${{env.APP}}' |