endret fra hex-kode til hexkode #65
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 produktside | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: 'read' | |
id-token: 'write' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Yarn install | |
working-directory: doks | |
run: yarn install | |
- name: Yarn build | |
working-directory: doks | |
run: yarn build | |
- name: Deploy doc to SPA | |
id: deploy | |
uses: nais/deploy/actions/spa-deploy/v2@master | |
with: | |
app: leesah-produktside | |
team: leesah-quiz | |
source: doks/dist | |
ingress: https://leesah.nav.no | |
environment: prod-gcp | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
- run: echo "### SPA deployed! :rocket:" >> $GITHUB_STEP_SUMMARY | |
- run: echo "${{ steps.deploy.outputs.url }}" >> $GITHUB_STEP_SUMMARY | |
- name: Build and push | |
uses: nais/docker-build-push@v0 | |
id: docker-build-push | |
with: | |
team: leesah-quiz | |
docker_context: doks | |
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }} | |
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }} | |
- name: Deploy to prod | |
uses: nais/deploy/actions/deploy@v2 | |
env: | |
CLUSTER: prod-gcp | |
RESOURCE: doks/.nais/prod.yaml | |
VAR: image=${{ steps.docker-build-push.outputs.image }} | |
TELEMETRY: ${{ steps.docker-build-push.outputs.telemetry }} | |