Skip to content

Merge branch 'master' into dev #322

Merge branch 'master' into dev

Merge branch 'master' into dev #322

Workflow file for this run

name: Staging Build
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: NPM Install
run: |
npm install
- name: create env file
run: |
touch .env
echo IOBIO_BACKEND=${{ secrets.IOBIO_BACKEND }} >> .env
echo IOBIO_BACKEND_MOSAIC=${{ secrets.IOBIO_BACKEND_MOSAIC }} >> .env
echo USE_SSL=${{ secrets.USE_SSL }} >> .env
echo OMIM_API_KEY=${{ secrets.OMIM_API_KEY }} >> .env
echo SHOW_BLOGS_AND_TUTORIALS=${{ secrets.SHOW_BLOGS_AND_TUTORIALS }} >> .env
echo PHENOLYZER_PERMITTED=${{ secrets.PHENOLYZER_PERMITTED }} >> .env
- name: Stage Build
run: |
NODE_ENV=production npm run build
- name: Deploy to S3 stage bucket - index.html
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: "server/views"
DEST_DIR: "stage/gene.iobio.io"
- name: Deploy to S3 stage bucket - data
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: "client/data"
DEST_DIR: "stage/gene.iobio.io/data"
- name: Deploy to S3 stage bucket - assets
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: "client/assets"
DEST_DIR: "stage/gene.iobio.io/assets"
- name: Deploy to S3 stage bucket -app
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: "client/app/third-party"
DEST_DIR: "stage/gene.iobio.io/app/third-party"
- name: Deploy to S3 stage bucket -js/thirdparty
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: "client/js/thirdparty"
DEST_DIR: "stage/gene.iobio.io/js/thirdparty"
- name: Deploy to S3 stage bucket - build.js
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-east-1'
SOURCE_DIR: "client/dist"
DEST_DIR: "stage/gene.iobio.io/dist"
- name: Invalidate CloudFront
uses: chetan/invalidate-cloudfront-action@master
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION_STAGE_ID }}
PATHS: '/*'
AWS_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}