-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (54 loc) · 1.64 KB
/
deploy-staging.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
name: deploy staging
on:
push:
branches: [main]
permissions:
id-token: write
contents: read
jobs:
test:
uses: ./.github/workflows/test.yml
smart-camera-web:
needs: [test]
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
run:
working-directory: ./packages/smart-camera-web
steps:
- name: checkout code
uses: actions/checkout@v4
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ACTIONS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: deploy staging to s3
run: |
aws s3 sync --follow-symlinks --delete --exclude '*' --include 'smart-camera-web.js' . s3://${{ secrets.AWS_S3_BUCKET }}/js/staging
embed:
needs: [test]
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
run:
working-directory: ./packages/embed
steps:
- name: checkout code
uses: actions/checkout@v4
- name: set node version
uses: actions/setup-node@v4
- name: install dependencies
run: npm ci
- name: build application
env:
SENTRY_AUTH_TOKEN: '${{ secrets.SENTRY_AUTH_TOKEN }}'
run: npm run build && npm run build:dist
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_GITHUB_ACTIONS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: deploy staging to s3
run: |
aws s3 sync --follow-symlinks --delete dist s3://${{ secrets.AWS_S3_BUCKET }}/inline/staging