Skip to content

Commit

Permalink
CI-CD workflow added
Browse files Browse the repository at this point in the history
  • Loading branch information
splitadricejas committed Sep 30, 2021
1 parent 0cdc3a1 commit b096062
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 40 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: ci-cd
on:
pull_request:
branches:
- master
- development
push:
branches:
- master
- developement

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up nodejs
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
cache: 'npm'

- name: npm CI
run: npm ci

- name: npm Check
run: npm run check

- name: npm Test
run: npm run test

- name: npm Build
run: BUILD_BRANCH=${{ github.event.pull_request.head.ref }} BUILD_COMMIT=${{ github.sha }} npm run build

- name: Deploy S3 Development
if: github.event_name == 'push' && github.event.pull_request.head.ref == 'development'
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks --cache-control max-age=31536000,public
env:
AWS_S3_BUCKET: 'aws-development-split-public'
AWS_ACCESS_KEY_ID: ${{ secrets.NEW_STAGE_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.NEW_STAGE_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: './lib-umd'
DEST_DIR: sdk

- name: Deploy S3 Master
if: github.event_name == 'push' && github.event.pull_request.head.ref == 'master'
uses: jakejarvis/[email protected]
with:
args: --acl public-read --follow-symlinks --cache-control max-age=31536000,public
env:
AWS_S3_BUCKET: 'split-public'
AWS_ACCESS_KEY_ID: ${{ secrets.PUBLIC_ASSETS_PROD_USER }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PUBLIC_ASSETS_PROD_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: './lib-umd'
DEST_DIR: sdk
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

0 comments on commit b096062

Please sign in to comment.