-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (40 loc) · 1.85 KB
/
dev_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
name: Deploy to Staging
on:
push:
branches: [dev]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
env:
STAGE_NAME: dev
AWS_DEPLOYMENT_BUCKET: ${{ secrets.S3_BUCKET_DEV }}
POLLING_INTERVAL: 120
BIGCOMMERCE_STORE_HASH: ${{ secrets.BIGCOMMERCE_STORE_HASH_DEV }}
BIGCOMMERCE_TOKEN: ${{ secrets.BIGCOMMERCE_TOKEN_DEV }}
BIGCOMMERCE_CLIENT_ID: ${{ secrets.BIGCOMMERCE_CLIENT_ID_DEV }}
EXCEPTIONS_EMAIL_ADDRESS: ${{ secrets.EXCEPTIONS_EMAIL_ADDRESS_DEV }}
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Build and upload artifacts
run: sh scripts/upload.sh ${{ env.AWS_DEPLOYMENT_BUCKET }}
- name: Deploy to AWS CloudFormation
uses: aws-actions/aws-cloudformation-github-deploy@v1
with:
name: OrderReplication-${{ env.STAGE_NAME }}
template: cloudformation/stack.json
capabilities: CAPABILITY_NAMED_IAM
no-fail-on-empty-changeset: 1
parameter-overrides: "BigCommerceStoreHash=${{ env.BIGCOMMERCE_STORE_HASH }},StageName=${{ env.STAGE_NAME }},LambdaDeploymentPackagesBucketName=${{ env.AWS_DEPLOYMENT_BUCKET }},BigCommerceToken=${{ env.BIGCOMMERCE_TOKEN }},BigCommerceClientId=${{ env.BIGCOMMERCE_CLIENT_ID }},ExceptionsEmailAddress=${{ env.EXCEPTIONS_EMAIL_ADDRESS }},PollingInterval=${{ env.POLLING_INTERVAL }}"