-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.57 KB
/
deploy.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: Node CI
# Push tests pushes; PR tests merges
on: [ push, pull_request ]
defaults:
run:
shell: bash
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: arc build
uses: architect/action-build@v3
with:
use_lock_file: false
node-version: 20
# Deploy to staging when pushing to main
deploy_staging:
needs: build
name: Deploy staging
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: arc deploy
uses: architect/action-deploy@v1
with:
use_lock_file: false
node-version: 20
aws_access_key_id: ${{secrets.AWS_ACCESS_KEY_ID}}
aws_secret_access_key: ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Image Cache Warming
run: npx @enhance/image warm --directory /public/images --domain https://mamssz98pa.execute-api.us-east-1.amazonaws.com
# Deploy to production when pushing with a version tag
deploy_production:
needs: build
name: Deploy production
if: startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: arc deploy
uses: architect/action-deploy@v1
with:
use_lock_file: false
node-version: 20
aws_access_key_id: ${{secrets.AWS_ACCESS_KEY_ID}}
aws_secret_access_key: ${{secrets.AWS_SECRET_ACCESS_KEY}}
- name: Image Cache Warming
run: npx @enhance/image warm --directory /public/images --domain https://normalflow.pub