Skip to content

test acul deployment pipeline #19

test acul deployment pipeline

test acul deployment pipeline #19

Workflow file for this run

name: ACUL Screens - Build and Deploy
# This workflow file is provided as an example template for Auth0 ACUL deployments.
# It is intentionally included in the boilerplate example to demonstrate how to set up
# CI/CD for your own Auth0 ACUL implementation.
#
# When implementing in your own project:
# 1. Update paths and settings as needed
# 2. Configure the required GitHub secrets
#
# Note: This workflow is intentionally disabled with 'if: false' to prevent accidental runs.
# Remove this condition when deploying in your own environment.
on:
push:
branches: [main, master]
# Only trigger if files within the boilerplate example change.
paths:
- '**/*'
- '.github/deploy_config.yml' # This file is used to determine which screens to deploy
- '!.github/workflows/acul-deploy.yml'
- '!DEPLOYMENT.md'
- '!README.md'
pull_request:
branches: [main, master]
# Only trigger if files within the boilerplate example change.
paths:
- '**/*'
- '.github/deploy_config.yml' # This file is used to determine which screens to deploy
- '!.github/workflows/acul-deploy.yml'
- '!DEPLOYMENT.md'
- '!README.md'
workflow_dispatch: # Kept for manual triggering, but inputs removed
env:
NODE_VERSION: "22"
WORKING_DIR: "."
jobs:
build-and-deploy:
name: Build & Deploy ACUL Screens
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
outputs:
deployed_screens: ${{ steps.configure-auth0.outputs.deployed_screens }}
failed_screens: ${{ steps.configure-auth0.outputs.failed_screens }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
registry-url: 'https://registry.npmjs.org'
cache-dependency-path: ${{ env.WORKING_DIR }}/package-lock.json
- name: Install dependencies
shell: bash
working-directory: ${{ env.WORKING_DIR }}
env:
NPM_CONFIG_REGISTRY: 'https://registry.npmjs.org'
run: |
npm config set registry https://registry.npmjs.org/
npm ci
- name: Build application
shell: bash
working-directory: ${{ env.WORKING_DIR }}
run: |
echo "Starting build for all screens."
npm run build --if-present
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_S3_ARN }}
aws-region: ${{ secrets.AWS_REGION || 'us-east-1' }}
mask-aws-account-id: true
- name: Discover available screens
id: discover-screens
uses: ./.github/actions/discover-screens
with:
working-directory: ${{ env.WORKING_DIR }}
- name: Upload assets to S3
uses: ./.github/actions/upload-acul-to-s3
with:
working-directory: ${{ env.WORKING_DIR }}
s3-bucket-name: ${{ secrets.S3_BUCKET_NAME }}
- name: Setup Auth0 CLI
uses: ./.github/actions/setup-auth0-cli
with:
auth0-domain: ${{ secrets.AUTH0_DOMAIN }}
auth0-client-id: ${{ secrets.AUTH0_CLIENT_ID }}
auth0-client-secret: ${{ secrets.AUTH0_CLIENT_SECRET }}
- name: Configure Auth0 screens
id: configure-auth0
uses: ./.github/actions/configure-auth0-screens
with:
working-directory: ${{ env.WORKING_DIR }}
cdn-url: ${{ secrets.S3_CDN_URL }}
screens-json: ${{ steps.discover-screens.outputs.screens }}
- name: Deployment Summary
if: always()
uses: ./.github/actions/deployment-summary
with:
job-status: ${{ job.status }}
deployed_screens: ${{ steps.configure-auth0.outputs.deployed_screens }}
failed_screens: ${{ steps.configure-auth0.outputs.failed_screens }}