-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (54 loc) · 1.72 KB
/
Copy pathdeploy-staging.yml
File metadata and controls
68 lines (54 loc) · 1.72 KB
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
name: deploy-staging
on:
push:
branches:
- development
workflow_dispatch:
permissions:
contents: read
id-token: write
concurrency:
group: viewer-examples-staging-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
environment: staging
env:
DEPLOY_ENV: staging
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24.12.0
cache: npm
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
aws-region: us-east-1
- name: Deploy to staging
run: npx ts-node ./scripts/deploy.ts
- name: Collect failure artifacts
if: failure()
shell: bash
run: |
rm -rf .github-artifacts/failure
mkdir -p .github-artifacts/failure
if [[ -d dist ]]; then
cp -R dist .github-artifacts/failure/
fi
- name: Upload failure artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: viewer-examples-staging-failure-artifacts
if-no-files-found: ignore
compression-level: 0
path: .github-artifacts/failure/