Skip to content

Add temporary fixed input #2

Add temporary fixed input

Add temporary fixed input #2

Workflow file for this run

name: Deploy boxel-ui with ember
on:
workflow_call:
inputs:
environment:
required: true
type: string
# FIXME remove
push:
branches: [ui/deploy-cs-6634]
permissions:
contents: read
id-token: write
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
concurrency: deploy-ui-${{ inputs.environment }}
steps:
- uses: actions/checkout@v3
- name: Init
uses: ./.github/actions/init
- name: Set up env
env:
# FIXME restore
INPUT_ENVIRONMENT: staging
# INPUT_ENVIRONMENT: ${{ inputs.environment }}
run: |
echo "AWS_REGION=us-east-1" >> $GITHUB_ENV
if [ "$INPUT_ENVIRONMENT" = "production" ]; then
echo "AWS_ROLE_ARN=arn:aws:iam::120317779495:role/boxel-ui" >> $GITHUB_ENV
echo "AWS_S3_BUCKET=cardstack-boxel-ui-production" >> $GITHUB_ENV
echo "AWS_CLOUDFRONT_DISTRIBUTION=E2DDEHLJXF5LQ8" >> $GITHUB_ENV
elif [ "$INPUT_ENVIRONMENT" = "staging" ]; then
echo "AWS_ROLE_ARN=arn:aws:iam::680542703984:role/boxel-ui" >> $GITHUB_ENV
echo "AWS_S3_BUCKET=cardstack-boxel-ui-staging" >> $GITHUB_ENV
echo "AWS_CLOUDFRONT_DISTRIBUTION=E1RYJDFNHAI7XA" >> $GITHUB_ENV
else
echo "unrecognized environment"
exit 1;
fi
# FIXME production distribution is incorrect
- name: Download dist
uses: actions/download-artifact@v3
with:
name: ui-dist
path: packages/ui/tmp/deploy-dist
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Deploy
run: pnpm deploy:boxel-ui ${{ inputs.environment }} --verbose
env:
EMBER_CLI_DEPLOY_REUSE_BUILD: "1"
- name: Send notification to Discord
uses: cardstack/gh-actions/discord-notification-deploy@main
with:
app: "boxel-ui"
status: ${{ job.status }}
environment: ${{ inputs.environment }}
webhook: ${{ secrets.DISCORD_WEBHOOK }}