Skip to content

Merge pull request #145 from navikt/keep-open-version-selector-2 #76

Merge pull request #145 from navikt/keep-open-version-selector-2

Merge pull request #145 from navikt/keep-open-version-selector-2 #76

name: Build and deploy XP archive to prod
on:
push:
branches:
- main
jobs:
build-and-deploy:
name: Build and deploy to prod
permissions:
contents: read
id-token: write
uses: ./.github/workflows/.xp-archive-deploy.yml
with:
naisEnv: prod
VITE_APP_ORIGIN: https://cms-arkiv.ansatt.nav.no
XP_ORIGIN: https://www.nav.no
HTML_RENDER_API: http://nav-enonicxp-frontend/render-from-props
secrets:
READER_TOKEN: ${{ secrets.READER_TOKEN }}
NAIS_WORKLOAD_IDENTITY_PROVIDER: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
release:
name: Create a new release
needs: build-and-deploy
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Generate unique tag name
run: echo "TAG_NAME=$(date +%s)" >> $GITHUB_ENV
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
target_commitish: main
tag_name: release/prod@${{ env.TAG_NAME }} # Generates a unique tag using timestamp
name: Release ${{ github.ref_name }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} # This is a PAT with repo permissions