Skip to content

chore(deps): update peter-evans/create-or-update-comment action to v3… #364

chore(deps): update peter-evans/create-or-update-comment action to v3…

chore(deps): update peter-evans/create-or-update-comment action to v3… #364

name: Next Deployment
concurrency: next_environment
on:
push:
branches:
- main
jobs:
deployment:
runs-on: ubuntu-latest
environment:
name: Next
url: ${{ steps.spa-deployment.outputs.url }}
outputs:
spaUrl: ${{ steps.spa-deployment.outputs.url }}
permissions:
contents: read
packages: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci --ignore-scripts
- name: Azure Login
uses: Azure/[email protected]
with:
creds: '${{ secrets.AZURE_CREDENTIALS }}'
- name: Build and Deploy API
id: api-deployment
uses: ./.github/actions/build-and-deploy-api
with:
slot: "next"
releaseVersion: ${{ github.sha }}
mongoUri: ${{ secrets.DEV_MONGODB_URI }}
sentryKey: ${{ secrets.API_SENTRY_KEY }}
sentryAuthToken: ${{ secrets.SENTRY_AUTH_TOKEN }}
containerRegistryUrl: ghcr.io
containerRegistryUsername: ${{ github.actor }}
containerRegistryPassword: ${{ secrets.GITHUB_TOKEN }}
- name: Apply Database Migrations
run: ./tools/db/kordis-db.sh apply-pending-migrations
env:
MONGODB_URI: ${{ secrets.DEV_MONGODB_URI }}
MONGODB_DB: dev
- name: Build and Deploy SPA
id: spa-deployment
uses: ./.github/actions/build-and-deploy-spa
with:
apiUrl: ${{ steps.api-deployment.outputs.url }}
oauthConfig: ${{ secrets.DEV_OAUTH_CONFIG }}
releaseVersion: ${{ github.sha }}
deploymentEnv: "next"
publishToken: ${{ secrets.AZURE_STATIC_WEB_APP_TOKEN }}
sentryKey: ${{ secrets.SPA_SENTRY_KEY }}
sentryAuthToken: ${{ secrets.SENTRY_AUTH_TOKEN }}
e2e:
needs: deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'npm'
- run: npm ci
- name: Run SPA E2Es
run: npx nx e2e spa-e2e
env:
E2E_BASE_URL: ${{ needs.deployment.outputs.spaUrl }}
AADB2C_TEST_USERS: ${{ secrets.E2E_TEST_USERS }}
- uses: actions/upload-artifact@v3
if: failure()
with:
name: e2e-test-results
path: test-results/
if-no-files-found: ignore