first commit
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
name: Deploy Release to AWS Production
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to AWS
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: Build application
|
||||
run:
|
||||
yarn deploy-production
|
||||
env:
|
||||
CI: false
|
||||
|
||||
- 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: us-east-2
|
||||
|
||||
- name: Upload dist folder to S3
|
||||
run:
|
||||
aws s3 sync --delete dist s3://app.rocketplantech.com --acl public-read
|
||||
|
||||
- name: Invalidate Cloudfront Distribution
|
||||
run:
|
||||
aws cloudfront create-invalidation --distribution-id=E16H1FFD3URB32 --paths /*
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: Logs
|
||||
path: ./storage/logs
|
||||
@@ -0,0 +1,45 @@
|
||||
name: Deploy Dev Branch to AWS
|
||||
on:
|
||||
push:
|
||||
branches: [ dev ]
|
||||
#pull_request:
|
||||
#branches: [ dev ]
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to AWS
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: Build application
|
||||
run:
|
||||
CI=FALSE && yarn deploy-qa
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.QA_AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.QA_AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-2
|
||||
|
||||
- name: Upload dist folder to S3
|
||||
run: |
|
||||
aws s3 sync --delete dist s3://web-qa-mongoose-br2wu78v1.rocketplantech.com --acl public-read
|
||||
aws s3 cp s3://web-qa-mongoose-br2wu78v1.rocketplantech.com/index.html s3://web-qa-mongoose-br2wu78v1.rocketplantech.com/index.html --cache-control "max-age=0, must-revalidate" --content-type "text/html" --metadata-directive REPLACE --acl public-read
|
||||
|
||||
- name: Invalidate Cloudfront Distribution
|
||||
run:
|
||||
aws cloudfront create-invalidation --distribution-id=E1WZB3ALA7L1DR --paths /*
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: Logs
|
||||
path: ./storage/logs
|
||||
@@ -0,0 +1,46 @@
|
||||
name: Deploy Master Branch to AWS
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
#pull_request:
|
||||
#branches: [ dev ]
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy to AWS
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.x'
|
||||
|
||||
- name: Build application
|
||||
run:
|
||||
yarn deploy-staging
|
||||
env:
|
||||
CI: false
|
||||
|
||||
- name: Configure AWS Credentials
|
||||
uses: aws-actions/configure-aws-credentials@v1
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.STAGING_AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.STAGING_AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: us-east-2
|
||||
|
||||
- name: Upload dist folder to S3
|
||||
run:
|
||||
aws s3 sync --delete dist s3://web-staging-mongoose-n5tr2spgf.rocketplantech.com --acl public-read
|
||||
|
||||
- name: Invalidate Cloudfront Distribution
|
||||
run:
|
||||
aws cloudfront create-invalidation --distribution-id=E8LDW9E1E0R8T --paths /*
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
if: failure()
|
||||
with:
|
||||
name: Logs
|
||||
path: ./storage/logs
|
||||
Reference in New Issue
Block a user