-
Notifications
You must be signed in to change notification settings - Fork 8
71 lines (63 loc) · 2.2 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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
env:
EMBER_CLI_DEPLOY_REUSE_BUILD: "1"
# 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 }}