-
Notifications
You must be signed in to change notification settings - Fork 8
57 lines (49 loc) · 1.63 KB
/
deploy-ui.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy boxel-ui with ember
on:
workflow_call:
inputs:
environment:
required: true
type: string
permissions:
contents: read
id-token: write
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
concurrency: deploy-ui-${{ inputs.environment }}-${{ github.head_ref || github.run_id }}
steps:
- uses: actions/checkout@v4
- name: Init
uses: ./.github/actions/init
- name: Set up env
env:
INPUT_ENVIRONMENT: ${{ inputs.environment }}
run: |
echo "AWS_REGION=us-east-1" >> $GITHUB_ENV
if [ "$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=E3UUDP4PEB5IDV" >> $GITHUB_ENV
else
echo "unrecognized environment"
exit 1;
fi
- name: Build boxel-ui addon
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Deploy
run: pnpm deploy:boxel-ui ${{ inputs.environment }} --verbose
- 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 }}