Remove build reuse #5
Workflow file for this run
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 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: Build boxel-ui addon | |
run: pnpm build | |
working-directory: packages/boxel-ui/addon | |
- 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 | |
run: pnpm deploy:boxel-ui staging --verbose | |
# FIXME restore? | |
# - 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 }} |